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