Cygwin has a utility called cygpath that can be used to convert between cygwin and native Windows file paths. For instance:
$ cygpath --windows /cygdrive/d/X/git/myproject D:\X\git\myproject
We are going to create a script that uses this utility to convert the path before passing it to your editor. We will use emacs as an example, assuming it is installed in C:\emacs . Create a file called ~/bin/git-editor.sh :
#!/bin/sh /cygdrive/c/emacs/bin/emacsclientw.exe $(cygpath --windows "${1}")
(since this is Windows, we do not need to set the executable flag in this file)
Now set the git editor to the value for this script:
$ git config --global core.editor "~/bin/git-editor.sh"
source share