I am trying to complete a 3 way merge for a cherry picked commit, using Meld. However, I have difficulties understanding the directions in which changes flow between the 3 files shown by Meld. To give a better illustration, let's consider the following case:
On the master branch at commit 4e623e0, we have a tracked file, called test.c and it looks like this:
#include <stdio.h>
int main()
{
printf("Hello world!\n");
return 0;
}
We create branch 'other', and commit changes to test.c, so branch other is at commit 29771b0, and the test.c file looks like this:
#include <stdio.h>
#include "foo.h"
#include "headerx.h"
#include "headery.h"
#include "headerz.h"
int main()
{
printf("Hello world!\n");
if (x(2) > x(3))
return -1;
else if (z(2) > z(3))
return 44;
return 0;
}
Now we go back to branch 'master', and commit changes to test.c, so branch master is at commit 02fd8c8, and the test.c file looks like this:
include <stdio.h>
#include "foo.h"
#include "bar.h"
int main()
{
printf("Hello world!\n");
return bar_fun(2);
}
Finally, on the master branch, we attempt to do
git cherry-pick 29771b0
git mergetool
and the following window shows up:
My question is:
- What sense does the marked arrow, pointing to the "LOCAL" file make?
- How can i turn off this "feature" (bug?)? It is rather annoying when merging large files, when Meld marks a big block of the "BASE" code and wants to push it into the "LOCAL" file.
- If it does make sense - why would I want to change, the "LOCAL" file? According to this SO post: Which version of the git file will be finally used: LOCAL, BASE or REMOTE?, the "LOCAL" pane should be open in read only mode. I have a rough understanding, of "LOCAL", "REMOTE", "BASE", and "MERGED" files, however the considered Meld option doesn't make sense to me.