Picture of Michael Lee
:wave: Hey hey, I'm Michael Lee and this is my site about being a developer, being a dad and making side projects.

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.

Thanks for taking the time to read this article. I'd love to stay in touch and share more tips on programming and design and side projects. 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