This question already has answers here:
Closed 4 years ago.
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.
To disable rename detection with TortoiseGit (though as being git-diff option, should apply to git by itself as well) I added the following line to gitconfig, which seems to do the trick (although based on documentation, I don't think it should):
[diff]
renameLimit = 1