Created
August 31, 2013 09:06
-
-
Save htuscher/6397088 to your computer and use it in GitHub Desktop.
How to move recent commits to a new branch
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 branch newbranch | |
git reset --hard HEAD~3 # Go back 3 commits. You *will* lose uncommitted work. | |
git checkout newbranch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment