Modify the comment information for the last commit of git commit and how to exit the Git bash vim editor

Source: Internet
Author: User

Today with git commit-m "comment" submitted, the comments were wrong, so the various search data began and git bash vim entanglement ... (Online information I really did not operate successfully, but finally found out)

Start with the git commit--amend command, (which modifies the last-submitted comment) and goes to the VIM editor

Then you will find in the editor how you do not respond to input, this is because vim in the non-editable state, press the letter key C, at this time into the editing state, you can start to modify the annotation information

And then you'll find out why you can't get out, back to the shell, and then operate as follows: ESC--"Exit the editing state, then press two times the capital letter key Z, then you will be pleasantly surprised to find, finally saved good exit!"

Windows system, pro-Test effective!! Take It away!

Modify the comment information for the last commit of git commit and how to exit the Git bash vim editor

Related Article

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.