< BACK

Git tips and tricks

Undo ‘git add’ or remove file(s) from staging area

i.e. remove a file from git index but not the working tree.

For a single file

git reset <file>

But also

git reset

without any file name will unstage all changes.

See reference.