【问题标题】:Git difftool with beyond compare returning 'fatal: cannot create directory at '': No such file or directory'Git difftool 无法比较返回'致命:无法在''创建目录:没有这样的文件或目录'
【发布时间】:2017-06-21 17:32:08
【问题描述】:

在处理我的 repo 时偶尔会收到此错误

fatal: cannot create directory at '': No such file or directory

当我尝试使用 Beyond Compare 4 进行如下比较时

'git difftool master head --dir-diff'

这是我删除了个人信息的 .gitconfig 文件

[difftool "beyondcompare"]
        cmd = c:\\program files\\beyond compare 4\\bcompare.exe
[core]
        autocrlf = true
[difftool "bc4"]
        cmd = C:/Program\\ Files/Beyond\\ Compare\\ 4/BCompare.exe \"$LOCAL\" \"$REMOTE\"
[diff]
        tool = bc3
[difftool]
        prompt = false
[user]
        name = <REMOVED>
        email = <REMOVED>
[credential "<REMOVED>"]
        authority = <REMOVED>
[difftool "bc3"]
        path = c:/Program Files/Beyond Compare 4/bcomp.exe
[diff]
tool = bc4
[difftool "bc4"]
cmd = \"c:/program files/beyond compare 4/bcomp.exe\" \"$LOCAL\" \"$REMOTE\"
[merge]
tool = bc4
[mergetool "bc4"]
cmd = \"c:/program files/beyond compare 4/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
trustExitCode = true

【问题讨论】:

    标签: git beyondcompare


    【解决方案1】:

    这与您定义的宏有关。 $local 指向 a/old_file,而 remote 指向 diff 上下文中的 b/new_file。

    另外要记住的是,除非它可以包含所有键,否则 git 只会使用它为配置找到的最后一个值,因此您拥有的其他值不会被使用并且会弄乱您的配置文件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-07-11
      • 1970-01-01
      • 2021-07-10
      • 2019-10-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多