Git commit--amend usage

Source: Internet
Author: User

The commit information is kept in your code base for a long time, so you will definitely want to know the code changes correctly with this information. The following command allows you to edit the last commit information, but you must make sure that the current code base (working copy) is not modified, or that the changes will be submitted with it.

$ git commit--amend-m "your-new-commit-message"

If you have pushed the code (git commit) to the remote branch, you will need to push the code submission through the following command.

$ git push <remote> <branch>--force turn from: http://www.oschina.net/news/68437/ Seven-git-hacks-you-just-cannot-ignore

Git commit--amend usage

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.