【发布时间】:2014-07-20 13:42:54
【问题描述】:
我配置了我的 git 来解决与 Sublimerge 的合并冲突。 为此,我被跑了:
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}\"'
当我运行 git mergetool 时,Sublime 将打开四列:.remote、.base、.local 和当前文件。但是,所有列都是空的。
并且所有列名的文件扩展名后都有一个“,例如:file.php.REMOTE.44625.php”、file.php.BASE.44625.php“、file.php.LOCAL.44625.php”和file.php”。然后我无法编辑冲突。
谁能帮帮我?
【问题讨论】:
-
stackoverflow.com/q/19297084/6309 的答案之一会有帮助吗?
-
@VonC,不...我已经看到了这个答案。
-
它是否有效
git difftool?崇高的文本控制台(ctrl`)中有什么吗?大概你正在使用 linux/mac?你在全局配置文件 ~/.gitconfig 中得到了什么? -
使用 Git 2.22(2019 年第二季度,五年后),
git config --global merge.tool smerge就足够了。见my answer below。
标签: git sublimetext3 git-config mergetool