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

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.

  • What is continuous integration?
  • Git ERROR: Permission to user1/repoA.git denied to user2
  • How to setup a basic symfony2 project after cloning it from github
  • BitNami GitLab Stack 5.1.0-2 with LDAP
  • Where should environment-specific values be saved in a Laravel 5 application?
  • Version-controlled extension configuration in Mercurial
  • 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.

  • Xcode thinks a remote svn repos is git
  • Forgot “git rebase --continue” and did “git commit”. How to fix?
  • How to clone and integrate external (from git) cmake project into local one
  • How to create a new branch on both local and remote? GIT
  • How do I preserve tags when filtering a repository?
  • Can I create “releases” in git like I can when using github?
  • 2 Solutions collect form web for “Can I rename LOCAL, REMOTE and BASE as used in git mergetool?”

    Is it possible to make git use the branch name instead of LOCAL

    I don’t think so, but if you declare in your mergetool a graphical merge tool, you can call that external tool with title of your choice:

    (extract of a merge tool calll script)

    t1="'$4 (current branch)'"
    t2="'(common ancestor)'"
    t3="'(to be merged)'"
    
        "C:/Program Files/Araxis/Araxis Merge/Compare.exe" -max -wait -merge -3 -a2 -title1:${t1} -title2:${t2} -title3:${t3} "$alocal" "$base" "$remote" "$result" 
    

    That way, you can more easily see what is what.

    I’m not entirely sure this explanation is correct, but BASE will be the point at which both versions of the file were the same. It might be what you call the ‘parent’ in a Git tree.

    When they diverged, you ended up with LOCAL and REMOTE which are conflicting with each other.

    Git Baby is a git and github fan, let's start git clone.