Skip to content

Instantly share code, notes, and snippets.

@derdesign
derdesign / gist:4652769
Last active December 11, 2015 20:08 — forked from HashNuke/gist:608259
Useful git commands
# To undo a git push
git push -f origin HEAD^:master
# To get to previous commit (preserves working tree)
git reset --soft HEAD
# To get back to previous commit (you'll lose working tree)
git reset --hard HEAD^
# To get back to a specific commit