Skip to content

Instantly share code, notes, and snippets.

@HashNuke
Created October 3, 2010 04:13
Show Gist options
  • Star 46 You must be signed in to star a gist
  • Fork 14 You must be signed in to fork a gist
  • Save HashNuke/608259 to your computer and use it in GitHub Desktop.
Save HashNuke/608259 to your computer and use it in GitHub Desktop.
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^
@XiaosongWen
Copy link

H

Still saving lives in 2019 !!!

So True :)

@loursbourg
Copy link

Instructions unclear, ended up removing everything. XD

@imasip
Copy link

imasip commented Jun 10, 2020

Still saving lives in 2020 !!!

@annieliu10
Copy link

Still saving lives in 2021!!

@sanxchep
Copy link

sanxchep commented Jan 8, 2021

saved a life in 2021!!!

@davidomego
Copy link

2021 saved a life

@BonaMarie
Copy link

saved my life omg

@mishrashree18
Copy link

Saved one more life!

@krisnadwipayana07
Copy link

Thanks, it's saved my workflow lol XD

@citixenken
Copy link

Still saving lives in 2022!

@surya758
Copy link

saved me on my first internship in 2022. Still working!!!

@umi000
Copy link

umi000 commented Jun 30, 2022

it saved my life too

@ProfPring
Copy link

just saved a life here in 2023

@Sugarcothe
Copy link

Here 2023, just saved me too 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment