Git – diff3 Conflict Style – Temporary merge branch

What you have here (with the Temporary merge branch 1 and same with 2) is due to git’s “recursive merge” method: o->branch1 = “Temporary merge branch 1”; o->branch2 = “Temporary merge branch 2”; merge_recursive(o, merged_common_ancestors, iter->item, NULL, &merged_common_ancestors); (merge-recursive.c, around line 1940). Git will do a recursive merge when the commit graph has multiple candidates … Read more

How to configure “git pull –ff-only” and “git merge –no-ff”

That shouldn’t be the case, according to the git-config man page on pull.ff: (…) When set to only, only such fast-forward merges are allowed (equivalent to giving the –ff-only option from the command line). This setting overrides merge.ff when pulling. The configuration pull.ff has been introduced in Git 2.x, so it won’t work as expected … Read more

How do you detect an evil merge in git?

The easiest thing to do would be to diff the results of your conflict resolution with a merge that auto-resolves conflicts without human intervention. Any automatic resolutions will be ignored, since they will be resolved in exactly the same way. I see two ways of visualizing the possible “evil” resolutions. If you are making this … Read more

How to merge git commits in the develop branch to a feature branch

To integrate one branch into another, you have to either merge or rebase. Since it’s only safe to rebase commits that aren’t referenced anywhere else (not merged to other local branches; not pushed to any remote), it’s generally better to merge. If your feature branch is purely local, you can rebase it on top of … Read more

Does the order of Git merging matter?

cmaster’s answer is correct, with caveats. Let’s start by noting these items / assumptions: There is always a single merge base commit. Let’s call this commit B, for base. The other two inputs are also single commits. Let’s call them L for left / local (–ours) and R for right / remote (–theirs). The first … Read more