Created
May 20, 2013 16:43
-
-
Save stouset/5613489 to your computer and use it in GitHub Desktop.
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
git checkout -b $new_branch_name $branch_you_did_the_changes_on # create a new branch with all the changes | |
git checkout $branch_you_did_the_changes_on # go back to the branch you did the work on | |
git stash -u # stash all your changes and any new files | |
git status # confirm a "clean" state | |
git reset --hard master # reset your branch back to being unchanged from `master` | |
git checkout master | |
git merge $new_branch_name # merge in the changes from the new branch | |
git checkout $branch_you_did_the_changes_on | |
git rebase master # fast-forward to the new state of master | |
git stash pop # bring all your changes back |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment