These days, I’m using the Sublime Text 2 Beta as my text editor of choice on Windows. I searched around to find the magical incantation to use that would allow Git to use it as my commit message editor and came up empty. It turns out not to be a big deal. Just create a batch file that launches sublime_text.exe with --wait and --new-window arguments. Something like the following:
"C:\Program Files\Sublime Text 2\sublime_text.exe" --wait --new-window "%1"
Then it’s just a matter of setting the batch file as the core editor used by git:
git --config core.editor C:/Scripts/sublime.bat
Update (2/25/2012): The –multiinstance command will do a much better job when launching sublime_text.exe from the command prompt, especially when you already have an instance of sublime_text.exe open. Update your batch file to look like so, and you should be good to go.
"C:\Program Files\Sublime Text 2\sublime_text.exe" --wait --multiinstance "%1"