Configure git mergetool with Sublimerge

I configured my git to resolve merge conflicts with Sublimerge.
For this, I was run:

git config --global merge.tool sublimerge

git config --global mergetool.sublimerge.cmd 'subl -n --wait \"$REMOTE\" \"$BASE\"   \"$LOCAL\" \"$MERGED\" --command \"sublimerge_diff_views\"'

git config --global mergetool.sublimerge.trustExitCode 'false'

git config --global diff.tool sublimerge

git config --global difftool.sublimerge.cmd 'subl -n --wait \"$REMOTE\" \"$LOCAL\" --command \"sublimerge_diff_views {\\\"left_read_only\\\": true, \\\"right_read_only\\\": true}\"'

When I run git mergetool, the Sublime will opening with four columns: .remote, .base, .local and the current file. But, all columns are empty.

  • Detach subdirectory (that was renamed!) into a new repo
  • Storing a git commits to a text-file
  • How to update a pull request from forked repo?
  • Git on godaddy - git-upload-pack not found
  • Git Clone: Just the files, please?
  • Git won't stop tracking eclipse java .recommenders
  • And all columns names has a ” after the file extension, like: file.php.REMOTE.44625.php”, file.php.BASE.44625.php”, file.php.LOCAL.44625.php”and file.php”. Then i cant edit the conflict.

    Anybody can help me?

  • Multiple projects with same GIT master
  • How to setup github repository in my NetBeans IDE?
  • warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal'
  • Git on Bitbucket: Always asked for password, even after uploading my public SSH key
  • Jenkins Git plugin detached HEAD
  • Remote rejected (shallow update not allowed) after changing Git remote URL
  • 2 Solutions collect form web for “Configure git mergetool with Sublimerge”

    In your ~/.gitconfig add following

    tool = sublimerge
    [mergetool "sublimerge"]
    cmd = subl -n --wait \"$REMOTE\" \"$BASE\" \"$LOCAL\" \"$MERGED\" --command \"sublimerge_diff_views\"
    trustExitCode = false
    tool = sublimerge
    [difftool "sublimerge"]
    cmd = subl -n --wait \"$REMOTE\" \"$LOCAL\" --command \"sublimerge_diff_views {\\\"left_read_only\\\": true, \\\"right_read_only\\\": true}\"

    after adding git merge tool as sublime editor then verify ~/.gitconfig file.

    $git config --list
    core.editor=subl -n -w
    mergetool.sublimerge.cmd=subl -n --wait \"$REMOTE\" \"$BASE\"   \"$LOCAL\" \"$MERGED\" --command \"sublimerge_diff_views\"
    difftool.sublimerge.cmd=subl -n --wait \"$REMOTE\" \"$LOCAL\" --command \"sublimerge_diff_views {\\\"left_read_only\\\": true, \\\"right_read_only\\\": true}\"

    if not reflected then manually add merge tool details

    $vim ~/.gitconfig
            editor = subl -n -w
            tool = sublimerge
    [mergetool "sublimerge"]
            cmd = subl -n --wait \\\"$REMOTE\\\" \\\"$BASE\\\"   \\\"$LOCAL\\\" \\\"$MERGED\\\" --command \\\"sublimerge_diff_views\\\"
            trustExitCode = false
            tool = sublimerge
    [difftool "sublimerge"]
            cmd = subl -n --wait \\\"$REMOTE\\\" \\\"$LOCAL\\\" --command \\\"sublimerge_diff_views {\\\\\\\"left_read_only\\\\\\\": true, \\\\\\\"right_read_only\\\\\\\": true}\\\"
    Git Baby is a git and github fan, let's start git clone.