How do I prevent an automerge using Git?

You are trying to bypass Git from getting involved in the merge process and to hand-pick each line of each modified file to be merged. This not the same as git cherry-pick. Neither will git merge --no-commit, etc. help. You will need to do:

$ git checkout master
$ git difftool -t kdiff3 local-branch HEAD

In the KDiff3 window, the left hand side (A) is your local-branch and the right hand side (B) is your current branch (master).

Select Merge | Merge Current File from the menu (or press the colorful diamond shaped icon with the same title).

You will then be shown a diff and conflicts (if any) for each file. And you will have the ability to pick left or right side (A or B), or both, and/or manually tweak the merged file.

On another note, something is telling me you have some bigger issues with your workflow.

Leave a Comment