Git 使用技巧
1. 常见问题解决
1.1 撤回错误add的文件
举例:
不小心把.idea/vcs.xml add了
通过
git status
发现:
------------------------------------------------------------------------------------------
On branch master
Your branch is up to date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: .idea/vcs.xml
------------------------------------------------------------------------------------------
方法1,撤回所有add的文件:
git reset HEAD
方法2,撤回指定add的文件
git reset HEAD .idea/vcs.xml
本作品采用《CC 协议》,转载必须注明作者和本文链接