Git commit switch to third-party editor

Source: Internet
Author: User

Git commit-m "* * *" way to submit comments, there are restrictions, you can edit better comments by invoking a third-party editor

1 using the window's own notepad

git config--global core.editor notepad
Or valid for the current user
git config core.editor notepad

Unfortunately there will be the problem of Chinese garbled!

Not looking for a solution for the time being. Recommended Method 2

2 Open with sublime.

Download the installation sublime first, and then in the environment variable path, add the sublime installation directory path.

such as: * * *; C:\Program files\sublime Text 3;

Then open git bash and type:

git config core.editor sublime_text.exe

Restart the Git bash.

This is OK. However, it is important to note that you only need to enter:

Git commit

Git will automatically open sublime, and when you close sublime, git will normally commit the code.

Refer to:

Http://www.tuicool.com/articles/fea6nq

http://my.oschina.net/u/2004332/blog/411400

Git commit switch to third-party editor

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.