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

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

    I needed to do both of the following to get Git to launch Notepad++ in Windows:

    • Add the following to .gitconfig:

      editor = 'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin
      
    • Modify the shortcut to launch the Git Bash shell to run as administrator, and then use that to launch the Git Bash shell. I was guessing that the context menu entry "Git Bash here" was not launching Notepad++ with the required permissions.

    After doing both of the above, it worked.

提交回复
热议问题