DEV Community

Cover image for Day 6: How Undo a Git Add All
Matt Curcio
Matt Curcio

Posted on


Day 6: How Undo a Git Add All

...BEFORE committing

I use git add * a lot.
Actually, I use gita, gits, gitcm, gitp, as they are my Bash Aliases.

Next time, when you git add all and 2 dozen files are inadvertently added. Try these:

git reset - Deducts ALL the files you just staged


git reset file_name.ext Deducts ONE from the last staging.

Jus' Remember : The problem with using aliases is that they can become habitual. Not a bad thing, just something to watch for next time.

Top comments (1)

massii profile image

Awesome, been looking for this actually, thanks dude

50 CLI Tools You Can't Live Without

The top 50 must-have CLI tools, including some scripts to help you automate the installation and updating of these tools on various systems/distros.