Ever accidentally run git add --all
when you didn’t mean to add all your changed file to staging? I’ve done this many times especially because I use Oh My ZSH’s git alias which happens to be ga
for git add
and gaa
for git add --all
. Which makes it sometimes more error prone to stage all changed files.
If you’ve accidentally staged all your changed files you can unstage them all by using git reset
.
This should put you back in the state you were before staging all your changes files. Allowing you to stage changed files individually before you commit.