When committed, Bash opens a default VI editor to fill in the submission information to the submitter. In the window platform some users prefer to use other editors, such as the system's own editor. I am here to provide a Sublime2 editor configuration method, similar to other methods.
1. Install the Sublime2 Editor on your PC
2. Configure the path of the sublime2 under path in the environment variable, such as my path to D:\Program Files (x86) \sublime Text 2;
3. Open the Bash interface and enter git config core.editor sublime_text.exe ( note : I'm not adding--global if I want to be in all of the current projects
Use git config--global core.editor sublime_text.exe)
4. Run the git config--list command and you'll find one more of these.
5. When the configuration is complete, Exit and restart Bash
6. You will automatically open sublime when Git commits, and remember to close it when you save it.
--------------------------------------------------------------------------------
To open a text directly, run the Sublime_text.exe filename command on the line, such as: Sublime_text.exe a.txt
Modify the default editor by using Git to manage source code