Git two merge methods compare merge and Rebase

Source: Internet
Author: User


18:01 2015/11/18
Git two merge methods compare merge and Rebase
It's really simple, the sequence of ID records that each commit commits after merging.
Note: It is important that if the company uses Grrit,grrit not allowed to merge, it seems to use rebase
But do not explain, such as: on the server develop branch has many people in the development, you clone or pull down the latest code, but the development progress is not the same, you in the development of a task, the other people submitted a number of commit and push, you have now completed the development of the submission, Your submission number is 3,4 (note: The number does not mean that the order is actually a very long random string in reality), and now rebase is to get your code submitted to someone else after
EXPLANATION Blog: http://blog.csdn.net/jollyjumper/article/details/24743751
Recommended Blog: http://blog.csdn.net/wh_19910525/article/details/7554489
Began several times useless, so did not understand, later used, took my people explained to me, so read
Actually thought to understand, later led my person to explain after the understanding of the figure.
It is important to note that after you clone the Code (develop branch), you create your own work branch (Git Bash Command window) in the local clone code and then git checkout-b mywork after you enter the cloned code folder (--- This is to be able to receive new and new emergency development or bug tasks at any time, without the development being incomplete and affecting receiving new tasks or requiring additional backup processing, since new task work branches can be created from the develop branch again: Git checkout-b mywork2 for new tasks development) The rebase is to interact with code from the local clone, rather than interacting with the code on the server, unless the special declaration code is available and branching (focus: So switch back to the original clone branch after completing the development task on your own development Branch Develop:git Checkout develop, then: GI pull Origin develop, and then switch to the development branch: Git checkout mywork, at which time rebase will be effective) I was here all the time, and then I realized. Merge should be the same.
Of course, I guess there should be other ways to get the work branch and the server to interact with pull and push directly, but it's largely lost the meaning of the work branch, and there's hardly any point in creating a working branch.
I finally understand.

Git two merge methods compare merge and Rebase

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.