What does A (base), B (local), C (remote) in KDiff3 tied to git conflict solver?
Asked Answered
M

2

14

Lets assume i have a git branch FIX-8834 and branch VERSION-12.

I want to merge FIX-8834 to VERSION-12 in git.

Git tells there is a conflict.

I use Kdiff3 to solve it.

KDiff3 opens and there are 3 files open: A(base), B(local) and C(remote). What letter has the FIX_8834, VERSION-12 and from where is the third file coming from?

Is there any way to display human being names for the files in KDiff3?

Mortarboard answered 10/9, 2018 at 10:24 Comment(1)
L
28

The words are supposed to be human readable:

  1. Base is the first commit down the tree the two branches split off from. It is the first common ancestor. Often it is useful to have this to help decide which of the newer commits you want.
  2. Local is your local commit, the one in the current branch you are standing on.
  3. Remote is the remote commit, of the branch you are merging into your local one.

Note that when re-basing, you are in fact changing your locality in a sense, to stand on the new base. So, when rebasing:

  1. local is the your local commit, the one you are rebasing onto.
  2. Remote is the remote commit, you are rebasing on top of the local commit.
Lula answered 10/9, 2018 at 10:27 Comment(3)
is it fair to say that if you encounter a merge conflict when you do a rebase, "local" is actually "the branch you are rebasing onto (e.g. master)" and the "remote" is the branch you are replaying ontop (e.g. your feature)Bram
@Bram Indeed, that is a good point, thanks. I added it to the answer.Lula
that's ace thanks, I'm bookmarking this answer because I always forget!Bram
T
1

GIT performs merge in three ways, It finds the merge base of two branches that you are using. when you do git merge, it generates three different type of files.

A(base), B(local) and C(remote) where

B(LOCAL) is same as FIX-8834 in your case - this is your branch that you are merging.

C(Remote) is same as VERSION-12 in your case - This is the branch you are merging in to.

A(base) is the nothing but half-finished merge where conflicts are marked depending upon the tool that you are using.

For more, Please go through this link.

Titulary answered 10/9, 2018 at 10:38 Comment(1)
Seems you have local and remote switched.Alainealair

© 2022 - 2024 — McMap. All rights reserved.