Skip to content

Instantly share code, notes, and snippets.

@DerZyklop
Created April 28, 2014 10:32
Show Gist options
  • Save DerZyklop/11367966 to your computer and use it in GitHub Desktop.
Save DerZyklop/11367966 to your computer and use it in GitHub Desktop.
git: Set master to old commit
git checkout master~1 # Checkout previous commit on master
git checkout -b new_master # Create branch for new master
git branch -D master # Delete old master
git branch -mv new_master master # Make new_master master
# source: http://stackoverflow.com/questions/4359681/want-to-change-my-master-to-an-older-commit-how-can-i-do-this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment