Summary
To unstage a single file in Git, enter the following command in your terminal:
git reset HEAD file-name
To unstage all of the files that are currently staged, enter the following command in your terminal:
git reset
Exercises
First, add some code to index.html
. Then stage the changes using git add .
. Then unstage them using git reset
.
References
Undoing Things from the Pro Git book
git-reset from the Git documentation