我如何防止git认为我做了重命名 [英] How can I prevent git from thinking I did a rename

查看:105
本文介绍了我如何防止git认为我做了重命名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个文件 index.html template.html 。我将大部分 index.html 移到 template.html 中,现在git认为我在添加两个文件。是否有可能在特定情况下防止这种情况发生?

解决方案

有一个接受的答案,但它没有给出任何提示如何回答这个问题。

git-log(1)和git-diff(1)的正确答案是:

  --no-renames 
关闭重命名检测,即使配置
文件提供默认值也是如此。


I have two files index.html and template.html. I moved most of index.html into template.html and now git thinks that I did a rename when I add both files. Is it possible to prevent this in specific cases?

解决方案

There is an "accepted" answer, but it does not give any hint on how to answer the question.

The correct answer, from git-log(1) and git-diff(1) is:

   --no-renames
       Turn off rename detection, even when the configuration
       file gives the default to do so.

这篇关于我如何防止git认为我做了重命名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆