Skip to content

Instantly share code, notes, and snippets.

@HashNuke
Created October 3, 2010 04:13
Show Gist options
  • Select an option

  • Save HashNuke/608259 to your computer and use it in GitHub Desktop.

Select an option

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^
@mishrashree18

Copy link
Copy Markdown

Saved one more life!

@krisnadwipayana07

Copy link
Copy Markdown

Thanks, it's saved my workflow lol XD

@citixenken

Copy link
Copy Markdown

Still saving lives in 2022!

@surya758

Copy link
Copy Markdown

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

@umi000

umi000 commented Jun 30, 2022

Copy link
Copy Markdown

it saved my life too

@ProfPring

Copy link
Copy Markdown

just saved a life here in 2023

@Sugarcothe

Copy link
Copy Markdown

Here 2023, just saved me too ๐Ÿ˜Š

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