I\'m on branch a. I want to merge branch b into branch c. The merge is not a fast-forward, but it also doesn\'t require manual resolut
a
b
c
You can write a script even if your working directory is dirty. You will have to stash your changes first.
git stash git checkout c git merge b git checkout a git stash pop