让git忽略重命名 [英] Make git ignore rename

查看:102
本文介绍了让git忽略重命名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个要删除的文件 foo.txt ,另一个是 bar.txt ,我想补充一点。如果这两个文件的内容超过50%,Git会认为 foo.txt 正在重命名为 bar.txt code>。我怎样才能让Git真正把这个看作是一个个体的删除,在单个添加的情况下,在同一个提交中,不会改变全局阈值检测%。



谢谢! p>

解决方案

你不能。在内部,它们将被保存为删除和添加。 重命名的显示将在稍后计算,并取决于该阈值。

I have a file foo.txt which I want to delete, and another, bar.txt, that I wish to add. If these two files have more than 50% content that is the same, Git will consider that foo.txt is being renamed to bar.txt. How can I make Git really see this as an individual remove, with an individual add, in the same commit, without changing the global threshold detection %.

Thanks!

解决方案

You can't. Internally, they will be saved as a deletion and an addition. The display of "rename" will be calculated later and depends on that threshold.

这篇关于让git忽略重命名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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