Skip to content

Instantly share code, notes, and snippets.

@danikx
Forked from HashNuke/gist:608259
Created September 19, 2013 11:27
# 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^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment