Git mv records moving?

When you call git mv file1 file2 does it record the movement internally (to track history in the log) or is it exactly the same as calling mv file1 file2 , git rm file1 and git add file2 ?

+2
source share
1 answer

git mv exactly the same as the three operations you listed. Although Git does not explicitly record the movement in the repository, this step is detected later when you request the history. For example, adding the --follow switch to git log will automatically find files that have been renamed.

+5
source

All Articles