Skip to content

Instantly share code, notes, and snippets.

View theanuraggupta's full-sized avatar
😄
Welcome to my github

Anurag Gupta theanuraggupta

😄
Welcome to my github
View GitHub Profile
@theanuraggupta
theanuraggupta / gist:4cbe7e5b35f276bb518b4fc6af15f1ca
Created December 8, 2018 11:00 — 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^