git 中的错误 mergetool 代码比较
Error mergetool code compare in git
当我执行 git pull 时,我遇到了一些冲突,但我尝试使用 mergetool(代码比较)修复此冲突,但我收到此错误:
我的 .gitconfig 配置是这样的:
[core]
autocrlf=false
[difftool "codecompare"]
cmd = 'C:\Program Files\Devart\Code Compare\codecompare.exe' -W \"$LOCAL\" \"$REMOTE\"
renames = true
[diff]
tool = codecompare
guitool = codecompare
[mergetool "codecompare"]
cmd = 'C:\Program Files\Devart\Code Compare\codemerge.exe' -MF=\"$LOCAL\" -TF=\"$REMOTE\" -BF=\"$BASE\" -RF=\"$MERGED\"
trustExitCode = true
[mergetool]
keepBackup = false
[merge]
tool = codecompare
guitool = codecompare
参数填充如下:
参数:
"-MF=./DBchanges/file change DB1.0_LOCAL_3972.sql"
"-TF=./DBchanges/file change DB1.0_REMOTE_3972.sql"
"-BF=./DBchanges/file change DB1.0_BASE_3972.sql"
"-RF=DBchanges/file change DB1.0.sql"
有人知道可能是什么原因吗?
谢谢大家
我找到了解决方案:
问题出在这一行:
[mergetool "codecompare"]
cmd = 'C:\Program Files\Devart\Code Compare\codemerge.exe' -MF=\"$LOCAL\" -TF=\"$REMOTE\" -BF=\"$BASE\" -RF=\"$MERGED\"
我们需要更改 space (-MF \"$LOCAL\"
) 的符号“=”,因为引用的参数如下:
"-MF=./DBchanges/file change DB1.0_LOCAL_3972.sql"
并且必须像:
-MF "./DBchanges/file change DB1.0_LOCAL_3972.sql"
当我执行 git pull 时,我遇到了一些冲突,但我尝试使用 mergetool(代码比较)修复此冲突,但我收到此错误:
我的 .gitconfig 配置是这样的:
[core]
autocrlf=false
[difftool "codecompare"]
cmd = 'C:\Program Files\Devart\Code Compare\codecompare.exe' -W \"$LOCAL\" \"$REMOTE\"
renames = true
[diff]
tool = codecompare
guitool = codecompare
[mergetool "codecompare"]
cmd = 'C:\Program Files\Devart\Code Compare\codemerge.exe' -MF=\"$LOCAL\" -TF=\"$REMOTE\" -BF=\"$BASE\" -RF=\"$MERGED\"
trustExitCode = true
[mergetool]
keepBackup = false
[merge]
tool = codecompare
guitool = codecompare
参数填充如下:
参数:
"-MF=./DBchanges/file change DB1.0_LOCAL_3972.sql"
"-TF=./DBchanges/file change DB1.0_REMOTE_3972.sql"
"-BF=./DBchanges/file change DB1.0_BASE_3972.sql"
"-RF=DBchanges/file change DB1.0.sql"
有人知道可能是什么原因吗?
谢谢大家
我找到了解决方案:
问题出在这一行:
[mergetool "codecompare"]
cmd = 'C:\Program Files\Devart\Code Compare\codemerge.exe' -MF=\"$LOCAL\" -TF=\"$REMOTE\" -BF=\"$BASE\" -RF=\"$MERGED\"
我们需要更改 space (-MF \"$LOCAL\"
) 的符号“=”,因为引用的参数如下:
"-MF=./DBchanges/file change DB1.0_LOCAL_3972.sql"
并且必须像:
-MF "./DBchanges/file change DB1.0_LOCAL_3972.sql"