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.
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 mergetool allows you to use a GUI merge program (i.e. Meld) to resolve the merge conflicts that have occurred during a merge. Like difftool you can set the GUI program on the command line using -t <tool> / --tool=<tool> but, as before, it makes more sense to configure it in your . gitconfig file.
DESCRIPTION. Use git mergetool to run one of several merge utilities to resolve merge conflicts. It is typically run after git merge. If one or more <file> parameters are given, the merge tool program will be run to resolve differences on each file (skipping those without conflicts).
Use :cquit , or git merge --abort and do the merge again.
In your ~/.gitconfig add following
[merge]
tool = sublimerge
[mergetool "sublimerge"]
cmd = subl -n --wait \"$REMOTE\" \"$BASE\" \"$LOCAL\" \"$MERGED\" --command \"sublimerge_diff_views\"
trustExitCode = false
[diff]
tool = sublimerge
[difftool "sublimerge"]
cmd = subl -n --wait \"$REMOTE\" \"$LOCAL\" --command \"sublimerge_diff_views {\\\"left_read_only\\\": true, \\\"right_read_only\\\": true}\"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With