当git merge时有一个collison,我打开一个名为Meld的mergetool。 它打开三个文件LOCAL,BASE和REMOTE。 我读过LOCAL是我的本地分支,BASE是共同的祖先,REMOTE是要合并的分支。
现在我的问题:哪个版本的文件将被终止使用? 是否REMOTE? 如果是这样,我可以根据需要编辑它,不管BASE分支中有什么?
When there's a collison during git merge, I open a mergetool called Meld. It opens three files LOCAL, BASE and REMOTE. As I've read LOCAL is my local branch, BASE is common ancestor and REMOTE is the branch to be merged.
Now to my question: which version of the file will be finally used? Is it REMOTE? If so, can I edit it as I want, regardless what's in the BASE branch for example?
最满意答案
这是中间的一个: BASE 。
实际上, BASE并不是共同的祖先,而是在冲突被标记为>>>>和<<<<的半成品合并中。
您可以在meld编辑窗口顶部看到文件名。
看到这里的截图
您可以使用或不使用meld命令来编辑BASE文件。 您也可以摆脱混合,只需使用自己喜欢的文本编辑器编辑文件。
<<<< HEAD和=====标记之间的代码是合并之前的本地文件之一。 ====和>>>> <branch name>之间的代码是远程文件之一。It's the one in the middle : BASE.
In fact, BASE is not the common ancestor, but the half-finished merge where conflicts are marked with >>>> and <<<<.
You can see the file names on the top of meld editing window.
See the screenshot here
You can edit the BASE file as you want with or without using meld commands. You can also get rid of meld and just edit the file with your favorite text editor.
The code between <<<< HEAD and ===== markers is the one of your local file before the merge. The code between ==== and >>>> <branch name> is the one of the remote file.更多推荐
发布评论