https://www.cnblogs.com/sunshine-xin/articles/3521481.html 1. git rm --cached file will remove the file from the stage. That is, when you commit the file will be removed. git reset HEAD -- file will simply reset file in the staging area to the state…
git rm`命令会把文件从已跟踪列表(及暂存区)中移除,并且移除把文件从工作目录中移除,这样下一次你就不会在未跟踪文件列表中看到这些文件了. 如果你只是简单的把文件从工作目录移除,而没有使用git rm $ git status On branch master Changes not staged for commit: (use "git add/rm <file>..." to update what will be committed) (use "gi…