I am using BeyondCompare to do merge, but I have an issue with not existing files locally.
On branch dev
I have the file src/foo.hpp
, but on master
I don't have this file.
When I do :
git checkout master
git difftool dev
I cannot save my file, because it pointing to /dev/null
.
Here my .gitconfig
:
[difftool "bc4"]
cmd = "\"/mnt/c/Program Files/Beyond Compare 4/BComp.exe\" \"$(wslpath -aw \"$LOCAL\")\" \"$(wslpath -aw \"$REMOTE\")\" /lefttitle=\"$(wslpath -aw \"$LOCAL\")\" /righttitle=\"$(wslpath -aw \"$REMOTE\")\""
[difftool "echo"]
cmd = "echo" $LOCAL $REMOTE
If I do:
git difftool -techo dev
/tmp/hxqHC9_foo.hpp /dev/null
I see that Git does not allow for creating file locally.
Is there a workaround other than this?:
touch src/foo.hpp
git add src/foo.hpp
git commit -m "Add missing file"