I\'m trying out Git on Windows. I got to the point of trying \"git commit\" and I got this error:
Terminal is dumb but no VISUAL nor
I also use Cygwin on Windows, but with gVim (as opposed to the terminal-based Vim).
To make this work, I have done the following:
git_editor.bat
) which contains the following:
"C:/Program Files/Vim/vim72/gvim.exe" --nofork "%*"
git_editor.bat
on in my PATH
.GIT_EDITOR=git_editor.bat
With this done, git commit
, etc. will correctly invoke the gVim executable.
NOTE 1: The --nofork
option to gVim ensures that it blocks until the commit message has been written.
NOTE 2: The quotes around the path to gVim is required if you have spaces in the path.
NOTE 3: The quotes around "%*" are needed just in case Git passes a file path with spaces.