I currently have in C:\Users\me\.gitconfig
the following contents
[merge]
tool = intellij
[mergetool "intellij"]
cmd = cmd.exe //c "\"C:/Program Files/JetBrains/IntelliJ IDEA 2018.1.5/bin/idea.bat\" merge \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\""
trustExitCode = true
[diff]
tool = intellij
[difftool "intellij"]
cmd = cmd.exe //c "\"C:/Program Files/JetBrains/IntelliJ IDEA 2018.1.5/bin/idea.bat\" diff \"$LOCAL\" \"$REMOTE\""
and when I do git difftool
I get
'C:/Program' is not recognized as an internal or external command,
operable program or batch file.
In [Git Docs], it is mentioned that
The following escape sequences (beside \" and \) are recognized: \n for newline character (NL), \t for horizontal tabulation (HT, TAB) and \b for backspace (BS). Other char escape sequences (including octal escape sequences) are invalid.
I also looked at Syntax for specifying Windows paths and tried some combinations:
# Escape spaces
Program\\ Files
Program/ Files
Program\ Files
# Backslashes
C:\Program Files\...
# 'C:\Program' is not recognized
But none worked, what is the right way to do this?