What are the three files in a triangular merge for interactive reloading using git and meld?

Say I'm doing an interactive reboot with git rebase -i. If any conflict arises, I may encounter a merge conflict and ask for a three-way merger. Using meld, I am presented with three windows: LOCAL(left), ???(middle) and REMOTE(right). Here, ???I mean simply that it melddoes not provide a special name to be added to the file.

During a normal merge, this makes sense, since the middle is a common ancestor, and you combine local and remote changes to that ancestor. However, this does not seem to be the case during the interactive reinstallation - it is unclear what each file is.

What are these three-dimensional files represented during interactive redirection? And when editing these files, what is my goal?

Update: Based on the comments and experiments I see:

  • Left ( LOCAL): Your local version of the file at this point in the commit retry sequence.
  • Right ( REMOTE): The state of the file immediately after the current commit was originally applied.
  • Medium: The parent of the right in the original commit sequence.

My task, therefore, is to determine the delta from middle to right, and then apply this delta to the left. The tool should reflect the state of the file after the current commit commit is applied in the new commit sequence.

, , -, meld, . Git 3- .

+4
2

- , git merge.

( "" , "remote", , , Mercurial "",

, ?

.

, , ( ). , .

(, . . --3way, --no-3way am.threeWay git -am, , .)

$ git rebase -i
pick aaaaaaa first commit
pick bbbbbbb second commit
pick ccccccc third commit

, , , :

              A - B - C   <-- branch
            /
... - o - *
            \
              G - H       <-- origin/branch

A, B C (A= aaaaaaa ..), : :

              A - B - C   [abandoned]
            /
... - o - *           A' - B' - C'   <-- branch
            \       /
              G - H       <-- origin/branch

, A.

(diffs) A , commit *, diff commit H.

Commit H, , commit *. , A H, ... commit *. , , Git , .

, commit * A H. , commit A'. ( SHA-1 , , aaaaaa1. , , A'.)

cherry-pick B. B , A, diff A'.

Commit A', , commit B. , B A', ... commit * . , . , Git , , . , Git diff * vs B * vs A' diff. , * vs B , A, * vs A' A, , , Git . Git . ( 2.6, .)

git diff commit A B. index:

diff --git a/foo b/foo
index f0b98f8..0ea3286 100644

() foo commit A. - commit B.

Git . , commit A . (Git --build-fake-ancestor git apply). , , , commit A. Git , blob .)

, Git cherry-picking A, commit *, .

, C. B vs C, , A vs B. , ; , commit * . . , , , B .

, , : . ( git rerere .)

+5

. , ( ) rebase. , , .

-1

All Articles