- # If there are changes in master that make the branch not apply cleanly:
- git checkout -b temp master; git merge <local-branch-name>
- # If error, reset temp, merge master into local; else skip these three lines
- git reset --hard HEAD;
- git checkout <local-branch-name>;
+ git checkout master
+ git merge --no-commit <local-branch-name>
+ git reset --hard HEAD;
+ git checkout <local-branch-name>;
+
+ # If there are changes in master that make the branch not apply cleanly, there
+ # should have been en error during the merge step above. If there was an
+ # error, merge the master branch into the local branch, fix the conflicts, and
+ # commit the new version of the local branch.