Is there a way to say this more concisely?
git checkout master
git merge branch
What I actually want to do much of the time is:
git rebase master branch
git checkout master
git merge branch
Answer https://stackoverflow.com/a/12343727/313842 sort of touched on this but leaves branch checkout out. git merge in one command is also a similar but different question.
git checkout master && git merge branch;-)git checkout -B master. It performs aresetinstead of a (fast-forward)merge, but that's safe since you did arebase masterfirst. This solution is also mentioned in an alternative answer to the one you linked to.