Created
April 28, 2014 10:32
-
-
Save DerZyklop/11367966 to your computer and use it in GitHub Desktop.
git: Set master to old commit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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