Git -Using SublimeText3 as the default editor

I prefer Sublime Text 3 over Vim as my default editor with git. Here is how I set that up on my windows workstation.

git config --global core.editor "\"C:\\Program Files\\Sublime Text 3\\sublime_text.exe\" -n -w"

The -n flag tells sublime to open in a new window, so this particular edit that you are doing is isolated and not a tab within an already running instance of Sublime Text 3.

The -w flag tells sublime to wait for the files to be closed before returning. This is what causes git to "hang" while it waits on your edits.

Wes Shaddix

Read more posts by this author.