Skip to content

Commit

Permalink
git mv->git rm
Browse files Browse the repository at this point in the history
  • Loading branch information
amimibear authored and networm committed Oct 16, 2021
1 parent c2a2641 commit 73d0e36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions book/02-git-basics/sections/recording-changes.asc
Original file line number Diff line number Diff line change
Expand Up @@ -627,5 +627,5 @@ $ git add README

如此分开操作,Git 也会意识到这是一次重命名,所以不管何种方式结果都一样。
两者唯一的区别在于,`git mv` 是一条命令而非三条命令,直接使用 `git mv` 方便得多。
不过在使用其他工具重命名文件时,记得在提交前 `git mv` 删除旧文件名,再 `git add`
添加新文件名。
不过在使用其他工具重命名文件时,记得在提交前 `git rm` 删除旧文件名,再 `git add`
添加新文件名。

0 comments on commit 73d0e36

Please sign in to comment.