git mv记录移动? [英] git mv records move?
本文介绍了git mv记录移动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当调用 git mv file1 file2
时,它会在内部记录移动(用于日志中的历史记录)还是与调用完全相同mv file1 file2
, git rm file1
和 git add file2
?
解决方案
- 关注
切换至 git log
会自动查找已重命名的文件。
When invoking git mv file1 file2
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.
这篇关于git mv记录移动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文