Git: Undo

By | May 13, 2016

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 *

2 + 12 =