Undo multiple file and folder 'git add'
This question already has an answer here:
git reset
(which is equivalent to git reset HEAD
) will un- add
(more commonly "unstage") all files.
In Git, revert
is used for undoing an existing commit (typically a commit that happened a while ago, or has been shared with others). If your commit has not yet been shared with others, there are ways to "rewrite" recent history such that you can pretend the changes you want to revert never happened in the first place.
您可以使用git reset HEAD
取消所有快照,或者使用git reset HEAD -- <filepath>
选择性地取消存放路径。
上一篇: 删除所有git commit文件?
下一篇: 撤消多个文件和文件夹'git add'