Git uses sublime_text to act as the default editor

Source: Internet
Author: User

Git uses Vim as the default editor, but this editor is always unavailable, so it is intended to replace it with sublime_text.

Use Windows Default notepad

git config --global core.editor notepad

Sublime_text is a little more troublesome.

1. Add the "D: \ Program Files \ sublime text 2 \" installation directory of sublime_text to the path of the environment variable.

If no environment variable is added, the following error occurs.

2. Change the default git editor.

Git config -- global core. Editor sublime_text.exe

The error "core. Editor has multiple values" is reported when the default editor is changed"

Therefore, use the following methods to handle the problem:

git config --global --add core.editor notepad  
3. Exit and restart git

Sublime_text can be used for submission, but sublime_text must be disabled after the output is complete. Otherwise, git cannot complete the submission.

Refer:

Http://www.cnblogs.com/1-2-3/archive/2010/07/10/git-use-emeditor.html

http://blog.plotcup.com/a/56



From Weizhi note (wiz)

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.