Undo multiple file and folder 'git add'

This question already has an answer here:

  • How to undo 'git add' before commit? 33 answers

  • 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>选择性地取消存放路径。

    链接地址: http://www.djcxy.com/p/6160.html

    上一篇: 删除所有git commit文件?

    下一篇: 撤消多个文件和文件夹'git add'