git unstage all files

Written by Michael Lee 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, side projects and working remotely. Sign up and I'll send you my articles straight to your email.

:wave: Hey hey, I'm Michael Lee! I really appreciate you taking the time to read this article.

Be sure to check out my other articles.

Previous post: Only thing that matters
Next post: I'll do me