This post dives a bit into the git reset command. If you want to jump straight to the good stuff, click here.
I wanted to share a handy alias I use for removing files from the staging area in git. Often I'll be working and adding files to the staging area with
git add, and then decide (for example), that I don't want to commit some files with the others and get them out of the staging area (but keep my work intact). Let's look at an example case - running
git status after staging a file might look like this:
$ git add example.txt $ git status # On branch test # Changes to be committed: # (use "git reset HEAD
..." to unstage) # # modified: example.txt #