Picture of Michael Lee
:wave: Hey hey, I'm @michaelsoolee! I'm a full-stack developer, maker of one too many side projects and dad.

git unstage all files

Written on February 23, 2018

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.

Stay in touch

Thanks for reading this article. I'd love to stay in touch and share more tips on programming, design and side projects with you. Sign up and I'll send you my articles straight to your email.
Previous post: Only thing that matters
Next post: I'll do me