I think the problem was caused because:
- I accidentally committed something (let's call it
A) onliveinstead ofmaster. - I then committed something else (
Bsay) onmaster. - I realised I made the mistake 1. and merged
liveontomaster. - I still needed to merge
Bontolive, so I mergedmasterontolive.
I think this created a "crossing" of commit paths that makes it impossible for git merge to fast-forward.
The solution was to first ensure that the two branches really did have the same contents:
git diff master..live git cherry -v master live git cherry -v live master all yielded no result. Then I changed live to point at exactly the same commit as master:
git branch -f live ae5e70... # Hash of the commit pointed to by master git push --force origin live:live Now I can fast-forward again. Note that this can be dangerous and should probably not be done when the repository is sharedthis can be dangerous and should probably not be done when the repository is shared.