Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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^
@BonaMarie
Copy link

BonaMarie commented Apr 20, 2021

saved my life omg

@mishrashree18
Copy link

mishrashree18 commented May 4, 2021

Saved one more life!

@krisnadwipayana07
Copy link

krisnadwipayana07 commented Oct 3, 2021

Thanks, it's saved my workflow lol XD

@citixenken
Copy link

citixenken commented Apr 11, 2022

Still saving lives in 2022!

@surya758
Copy link

surya758 commented Jun 15, 2022

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

@umi000
Copy link

umi000 commented Jun 30, 2022

it saved my life too

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