Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There are 4 files involved:</p> <ol> <li><p><strong><code>$LOCAL</code></strong> The file on the branch where you are merging; <em>untouched by the merge process when shown to you</em></p></li> <li><p><strong><code>$REMOTE</code></strong> The file on the branch from where you are merging; <em>untouched by the merge process when shown to you</em></p></li> <li><p><strong><code>$BASE</code></strong> The common ancestor of $LOCAL and $REMOTE, ie. the point where the two branches started diverting the considered file; <em>untouched by the merge process when shown to you</em></p></li> <li><p><strong><code>$MERGED</code></strong> The partially merged file, with conflicts; <em>this is the only file touched by the merge process and, actually, never shown to you in <code>meld</code></em></p></li> </ol> <hr> <p>The <code>$MERGED</code> file is the one that contains the <code>&lt;&lt;&lt;&lt;&lt;&lt;</code>, <code>&gt;&gt;&gt;&gt;&gt;&gt;</code>, <code>=====</code> (and, maybe, <code>||||||</code>) markers (that delimit conflicts). <em>This</em> is the file that you edit <em>manually</em> to correct conflicts.</p> <p><em>The manual conflicts editing and the visual conflicts editing are done on different files and presented different informations.</em></p> <p>When using the mergetool (assume <code>meld</code>), the files that are seeing therein are: <code>$LOCAL</code>, <code>$BASE</code>, <code>$REMOTE</code>. Note that you don't see the <code>$MERGED</code> file, although this is passed as a hidden parameter to <code>meld</code> to write the result of the edit there.</p> <p>In other words, in <code>meld</code>, you are editing the file in the middle, the <code>$BASE</code> file, and you pick all the changes from left or from the right <em>manually</em>. It is a clean file, not touched by the merge process. The only glitch is that, when you save, you do not save into the <code>$BASE</code> file, but in the fourth hidden parameter of <code>meld</code>, that is the <code>$MERGED</code> file (that you do not even see). The <code>$BASE</code> file does <em>not</em> contain any conflicts or partial successful merges because <em>it is not the <code>$MERGED</code> file</em>.</p> <p>In the visual editing, when presenting to you the <code>$BASE</code> file (instead of the <code>$MERGED</code> file) <code>git</code> basically discards all its attempts to do the merging (those attempts are visible, if you want, in the $MERGED file) and lets you to <em>completely</em> do the merging <em>from scratch</em>.</p> <p><em>The bottom line is that in manual and visual merging conflicts you are not looking at the same files, but the final result is written in the same file (that is the <code>$MERGED</code> file).</em></p> <p>The manual correction of the conflicts is done on <code>$MERGED</code> because <code>git</code> <em>has no mean</em> to present you three files, so it squashes the information from the three files (<code>$LOCAL</code>, <code>$BASE</code>, <code>$REMOTE</code>) in that <code>$MERGED</code> file.</p> <p>But the visual tools <em>have the means</em> to show you three files: they show you the <code>$LOCAL</code>, <code>$BASE</code>, <code>$REMOTE</code> files. You are picking changes from the <code>$LOCAL</code> and <code>$REMOTE</code> files and you are bringing those into the <code>$BASE</code> file, completely re-building and even overwriting the failed attempt of merging that is the <code>$MERGED</code> file.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload