How to remove files from git staging area?

后端 未结 14 1281
失恋的感觉
失恋的感觉 2020-11-28 16:53

I made changes to some of my files in my local repo, and then I did git add -A which I think added too many files to the staging area. How can I delete all the

14条回答
  •  星月不相逢
    2020-11-28 17:48

    As noted in other answers, you should use git reset. This will undo the action of the git add -A.

    Note: git reset is equivalent to git reset --mixed which does this

    Resets the index but not the working tree (i.e., the changed files are preserved but not marked for commit) and reports what has not been updated. This is the default action. [ git reset ]

提交回复
热议问题