Undo git add

This question already has an answer here:

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

  • It has already been answered several times:

    You can use git reset . This will 'unstage' all the files you've added after your last commit.

    If you want to unstage only some files, use git reset -- <file 1> <file 2> <file n> .

    Also it's possible to unstage some of the changes in files by using git reset -p .

    See

  • How to undo 'git add' before commit?
  • How can you undo the last git add?

  • 要重置您可以使用的特定文件: git reset -- <file_a> <file_b>或者重置所有更改,您可以使用git reset

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

    上一篇: 如何在提交之前撤消git add

    下一篇: 撤消git add