How can I set up an editor to work with Git on Windows?

后端 未结 30 1383
悲哀的现实
悲哀的现实 2020-11-22 13:57

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

30条回答
  •  我在风中等你
    2020-11-22 14:08

    Anyway, I've just been playing around with this and found the following to work nicely for me:

    git config --global core.editor "'C:/Program Files/TextPad 5/TextPad.exe' -m"
    

    I don't think CMD likes single-quotes so you must use double quotes "to specify the space embedded string argument".

    Cygwin (which I believe is the underlying platform for Git's Bash) on the other hand likes both ' and "; you can specify a CMD-like paths, using / instead of \, so long as the string is quoted i.e. in this instance, using single-quotes.

    The -m overrides/indicates the use of multiple editors and there is no need for a %* tacked on the end.

提交回复
热议问题