What are the methods of git code merging
In this article Xiaobian for you to introduce in detail "what are the methods of git code merging", the content is detailed, the steps are clear, and the details are handled properly. I hope this article "what are the methods of git code merging?" this article can help you solve your doubts.
Git Merge
This kind of merge is to merge the history of the two branches together, the existing branch will not be changed, it will cache the different files on both sides, and generate a commit to push.
Advantages: security, existing branches will not be modified
Disadvantages: it will pollute the branch history more or less, and it will make it more difficult to understand the project history when looking back at the project.
Usefulness: generally used in the main branch of public master
Git Rebase
This kind of merger is often called "derivative", which is to modify the submission history, compare the commit of both sides, and then find out the different ones to cache, and then go to push to modify your commit history.
Pros: the project history will be very neat
Cons: poor security and traceability, you will not know what changes you have made in this merger
Use: never use it on a public branch. It is generally used for branches that are used independently by themselves.
Read here, this article "what are the methods of git code merging" article has been introduced, want to master the knowledge of this article still need to practice and use to understand, if you want to know more about the article, welcome to follow the industry information channel.