Created
May 26, 2012 16:40
-
-
Save bom-d-van/2794551 to your computer and use it in GitHub Desktop.
Move recent commit to a new branch
This file contains 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
# http://stackoverflow.com/questions/1628563/git-move-recent-commit-to-a-new-branch | |
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