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.

  • --set-upstream track/pull a new branch from remote with forward slash “/” in the branch name
  • Remove files from Git commit
  • Use a git repository on /var/www/html/
  • Git marks entire file as conflicted when merging master into branch
  • View diff between two git revisions in VS2013
  • What is the difference between Stop Tracking and Discard File in git SourceTree
  • 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?

  • Git with Dropbox Issues
  • git: basic misunderstanding of “non-fast-forward” error
  • Visual Studio and libgit2 Git Commit Error In Different Solution
  • Git: Why are local branches pushed to remote automatically but require manual deletion after they are deleted locally?
  • Target Location in Sharing a Project using Egit
  • GIT Diff with blame or source SHA
  • 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.