Distributed version control system git-----8.fst-forward and no fast foward

Source: Internet
Author: User
Tags version control system

when the current branch is merged into another branch, the file pointer is moved directly if no disagreement is resolved. This process is called Fastforward.

For example, development has been done in the master branch, but suddenly there is a new idea, and a develop branch is created, and a series of commits are made on it, and when it is finished, it returns to Master Branch , at which pointtheMaster Branch does not produce any new commits after the develop branch is created . The merge at this point is called Fast forward.

It can be seen that this is a Merged , and the view is flat after merging, it is not visible Develop any information that is developed by the branch.

merging with –no-ff

-NO-FF (no fast foward), allowing each merge to create a new commit record. Even if this commit is fast-foward, it is used to avoid losing information.

as you can see, when you use no-ff , you generate a commit record and force The development record of the develop branch to persist (and Fast-forward 's words are a direct merger, not showing any previous Branch Records). This is especially useful for future code analysis.

And using-NO-FF merging has a practical significance. For example: If your leader travels, but the project is still in progress, so he let you continue to write, but the leader came back and found that you write these features is not what he wanted or later found that there is a big bug caused to give up this function, so it is very convenient to use this, but also very intuitive, Go directly to the leader before the trip to the commit history recovery is OK. Very intuitive, very direct.

The following two images are merged with fast-forward and-no-ff, and the second one is clearly intuitive.

Distributed version control system git-----8.fst-forward and no fast foward

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.