git 撤销 add 操作

git reset HEAD <file>

撤销刚才的add操作。如果不指定文件名,则撤销add的所有文件

git checkout -- <file>

原文地址:https://www.cnblogs.com/chenxi188/p/13213904.html