I have a git repository with two branches: master and live. I work on master. Once I deem my changes ready for production, I merge them into live, which is checked out in the production system. I work on the project alone.
With this setup, live always used to simply be a few commits behind master. So when I did a git merge master on live, the merge would be performed via fast-forward.
As of recently, doing git merge master while on live results in a merge performed by the recursive strategy. I don't know if the reason for this is that I once accidentally committed a change first on live, and only afterwards merged it onto master.
git diff master live yields no output, ie. the two branches have the same file contents.
What can I do to get my git repository into a "clean" state so it again uses the fast-forward strategy by default?
git merge --ff-only master?git diff, trygit cherry -v master live(andlive master). This will tell you what commits are the latter branch that aren't on the former. If you made a commit onliveand then latermergedit tomaster, it could have ended up with a different commit hash (even though your file contents are the same)... so maybe things started to skew from there?git merge --ff-only mastergivesfatal: Not possible to fast-forward, aborting.. @hinerm:git cherry -v master live(andlive master) both give no result. So strange!