Not in Git. Git uses similarity-based heuristic rename detection (you might need to enable it for viewing changes: git diff -M
, or git config diff.renames true
to always use it (or git diff -C
and git config diff.renames copies
to also detect copies). It detects renames on-the-fly.
It doesn't do rename tracking, and does not store information about renames anywhere.
That's assuming that you did not forget to include renamed file in the commit, i.e. you used git mv <old> <new>
... which is just mv <old> <new> && git add <new>
.
This means that if you have renamed file using other tools (e.g. IDE, filemanager, etc.), then you need to git add
new file (after rename), and delete old file if it exists (git rm
to remove it entirely, git rm --cached
to keep it in the working directory).