Can I rename LOCAL, REMOTE and BASE as used in git mergetool?

Posted by carleeto on Stack Overflow See other posts from Stack Overflow or by carleeto
Published on 2010-03-23T23:58:41Z Indexed on 2010/03/24 0:03 UTC
Read the original article Hit count: 318

Filed under:
|
|
|

Lets say I'm doing a rebase B of a branch onto master and there's a conflict. git opens up the default merge tool with 3 files as input : file.LOCAL, file.BASE, file.REMOTE (they're named a little differently, but LOCAL, BASE and REMOTE are in the file names and is how they are distinguished).

Now, according to the mergetool man page: $LOCAL is set to the name of a temporary file containing the contents of the file on the current branch; $REMOTE set to the name of a temporary file containing the contents of the file to be merged, and $BASE set to the name of a temporary file containing the common base for the merge.

That really does not make sense to me. LOCAL is the current state of the branch. Where I get lost is BASE and REMOTE. So my question is :

Is it possible to make git use the branch name instead of LOCAL and similarly more meaningful names other than BASE and REMOTE? For example, if the branch name is FeatureX and the BASE = the file as it exists in master, is there a way to get git to substitute FeatureX for LOCAL and master for BASE, so that it is more apparent where the source is coming from? This is especially a problem when doing a rebase.

© Stack Overflow or respective owner

Related posts about git

Related posts about rebase