I currently use Git for Windows to teach bash and git. If possible I want to move to using the local MobaXterm terminal instead. One of the requirements I have is that we can change the default text editor from vim to a more user friendly option like nano or even MobaTextEditor.

Unfortunately it doesn't seem to matter what I set git config --global core.editor to, or the EDITOR env variable to, git commit always ignores it and opens vim instead. It doesn't even give me an error, it just ignores the setting altogether.

I really want to move away from Git for Windows, but its not feasible to get a class full of newbies to use vim in the limited time we have. Does anyone know how to get another editor to work with git in MobaXterm's local terminal? Is there something simple I'm missing?

  • 1
    Git for Windows works identical to other git variants. If you do want a user friendly client you probably want to change to something that has a GUI. If you are using SSH just provide the git installation on the server. It's unclear what your current setup looks likes (e.g. where and how you installed git).
    – Seth
    Jan 24, 2020 at 9:48
  • Sorry, question wasn't clear enough, so I've edited it. I know how to get it to work in Git for Windows. My issue is with the local terminal in MobaXterm, which comes with git preinstalled.
    – Cara
    Jan 24, 2020 at 9:59
  • Can you edit your question to include (as a code block) the output of set | grep -aE 'EDITOR|VISUAL' and git var GIT_EDITOR?
    – bk2204
    Jan 25, 2020 at 22:00
  • Thanks, you were on the right track. I hadn't noticed the variable GIT_EDITOR had been set.
    – Cara
    Jan 27, 2020 at 8:59

1 Answer 1


From the git documentation (https://git-scm.com/docs/git-var):

The order of preference is the $GIT_EDITOR environment variable, then core.editor configuration, then $VISUAL, then $EDITOR, and then the default chosen at compile time, which is usually vi.

From some reason, MobaXterm is setting GIT_EDITOR rather than EDITOR or VISUAL. Unset or change that variable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.