Three minutes to teach you to learn git (12) Fast-forward

Source: Internet
Author: User

What is fast forward, as the name implies, is fast forward, how does git do it fast?


If git determines that it can fast forward, directly modify the current head pointer and then modify the current head pointer, it is white to modify the direction of two pointers, and did not generate a new commit object.


So when you change one of the commits in one of the branch, the other branch if the commit is also referenced, the branch will change unexpectedly because the same commit object is referenced.


So there are generally several ways:

1--no-ff

Display tells git not to fast forward

2 Cherry-pick

3--squash

Merge all commits into a commit, which is sure to generate a new commit.


Original: http://blog.csdn.net/hongchangfirst/article/details/45484191

Author: Hongchangfirst

Hongchangfirst's homepage: http://blog.csdn.net/hongchangfirst



Three minutes to teach you to learn git (12) Fast-forward

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.