Git: Undo

Git: Undo

Here are some undo commands, depending on situation.

# To go back to staging from commit
git reset --soft HEAD~

# Unstaging
git reset HEAD <file>

# Undo Changes Made to the File
git checkout -- <file>

Leave a Reply

Your email address will not be published. Required fields are marked *

20 − nineteen =