开发者

git mv records move?

开发者 https://www.devze.com 2023-01-19 17:53 出处:网络
When invoking git mv file1 file开发者_如何学运维2 does it record the move internally (for history tracking in the log) or is it completely the same as invoking mv file1 file2, git rm file1 and git add

When invoking git mv file1 file开发者_如何学运维2 does it record the move internally (for history tracking in the log) or is it completely the same as invoking mv file1 file2, git rm file1 and git add file2?


git mv is exactly the same as the three operations you listed. Although Git does not explicitly record the move in the repository, the move is detected later whenever you ask for history. For example, adding the --follow switch to git log automatically finds files that have been renamed.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号