Skip to content

Instantly share code, notes, and snippets.

View shperblim123's full-sized avatar

Shperblim Aliu shperblim123

  • Instant Programming
  • Kosova
View GitHub Profile
@shperblim123
shperblim123 / gist:19833bd0fc2544b8a283bf1e85d63d88
Created October 20, 2020 15:42 — 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^