Skip to content

Instantly share code, notes, and snippets.

View dektox's full-sized avatar

Anton Dek dektox

View GitHub Profile
@dektox
dektox / gist:7b426702514cdb581981edeb19c5da63
Created June 14, 2019 09:38 — forked from HashNuke/gist:608259
to undo push and commits
# 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^