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

后端 未结 30 1230
悲哀的现实
悲哀的现实 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:09

    I've just had the same problem and found a different solution. I was getting

    error: There was a problem with the editor 'ec'
    

    I've got VISUAL=ec, and a batch file called ec.bat on my path that contains one line:

    c:\emacs\emacs-23.1\bin\emacsclient.exe %*
    

    This lets me edit files from the command line with ec , and having VISUAL set means most unixy programs pick it up too. Git seems to search the path differently to my other commands though - when I looked at a git commit in Process Monitor I saw it look in every folder on the path for ec and for ec.exe, but not for ec.bat. I added another environment variable (GIT_EDITOR=ec.bat) and all was fine.

提交回复
热议问题