Prevent git from treating delete & new file w/ changes as a move
This question already has an answer here:
Make git ignore rename [duplicate]
2 Solutions collect form web for “Prevent git from treating delete & new file w/ changes as a move”
Renames are only something shown in the output, internally they are stored just as regular deletions and creations.
If you want to disable the renames detection, you can use the
git log --stat --no-renames
(also works with
git show, etc.)
If you don’t want to add this option all the time, you can add it to your config:
git config diff.renames false
Don’t worry, Git is just displaying the change as a rename as it looks like a rename. It’s not storing it as a rename as there is no way for Git to do this. Rename detection happens on commit display, not at record time.
You can use
git show --no-renames to avoid rename detection even if you have it on by default.