0

Occasionally when working on my repo I am getting this error

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

When I attempt to do a diff like below using Beyond Compare 4

'git difftool master head --dir-diff'

Here is my .gitconfig file with personal information removed

[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

1 Answers1

0

This has to do with the macros you have defined. $local points to a/old_file, while remote points to b/new_file in the diff context.

Also another thing to keep in mind is that git will only use the last value it finds for a config unless it can include all the keys, so the other values you have are not being used and are cluttering your config file.

Yazeed Sabri
  • 346
  • 3
  • 17