0

I ssh from a windows machine to a unix one. When I do a git commit, git always launch Vi on the remote machine so that I could type the commit message.

Is it possible to change the default editor to notepad on the windows client machine ?

aleroot
  • 71,077
  • 30
  • 176
  • 213
jjennifer
  • 1,285
  • 4
  • 12
  • 22
  • If you want to use a Windows editor you're going to need to install `git` on your Windows host. You can get `git` for Windows [here](http://git-scm.com/download/win). – larsks Aug 09 '13 at 18:48

2 Answers2

1

It is not possible to launch a GUI program in Windows over a typical ssh session. If you would like to switch the default editor to a different terminal editor such as nano, you can do that with:

git config --global core.editor "nano"

Source

Community
  • 1
  • 1
davidfg4
  • 476
  • 3
  • 9
0

It turned out that I have X-Win32 installed on my PC so I installed SublimeText 2 into the unix machine and adjusted the $PATH then ran git config --global core.editor sublimetext

Now $ git commit will launch SublimeText

also $ sublimetext filename.txt works as well

jjennifer
  • 1,285
  • 4
  • 12
  • 22
  • I could still not run notepad, or any other app. but at least I could have something nicer than VI with which I am not so familiar. – jjennifer Aug 09 '13 at 20:06