Frequently asked questions for git and git workflows.

How do I undo git add?

git reset


git reset file.txt

git add simply stages changes to be committed. To undo that action, all that’s needed is to git reset the file or list of files.

To undo a commit, see [How do I undo a commit?]( do I undo a commit?)