gitmergep4merge

Difference between 'remote', 'local', and 'base' using p4merge


I'm merging my branch on the master branch using the p4Merge tool, and I see three views:

LOCAL
REMOTE
BASE

What are the differences between these views?


Solution

  • This video tutorial does a good job of explaining what each of these views mean:

    4-pane merge tools show you these panes:

    • LOCAL – your file with the changes you’ve made to it
    • BASE – the common ancestor file that LOCAL and REMOTE came from
    • REMOTE – the file you’re merging in, possibly authored by someone else
    • MERGE_RESULT – the file resulting from the merge where you resolve conflicts

    We could visualize the history of the file as follows:

    remote: ... v1 -- v2 -- v3
                       \
    local:              v4
    

    Here v3 would be the REMOTE version of file, and v4 is the LOCAL version. The BASE is v2, and the MERGE_RESULT is the file which would result from merging the remote into the local file.