Skip to content

Instantly share code, notes, and snippets.

@postphotos
Last active March 30, 2017 20:29
Show Gist options
  • Save postphotos/6fa87f3ad74531a384652ce112487a28 to your computer and use it in GitHub Desktop.
Save postphotos/6fa87f3ad74531a384652ce112487a28 to your computer and use it in GitHub Desktop.
Roll back a live repo to an older commit
## This is useful if you have an emergency break on a git-to-deploy site, like a Wordpress WPEngine git push site.
## you grab the hash and force it to the remote name - i.e. origin, production, staging, etc.
## Be sure to git blame to yell at whoever borked it (Unless you're the sole developer on the project!) and trace your bugs!
git push -f staging 17ee2f0b24b6af6e03352ed71b7384639e6239ed:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment