Eclipse on git plugin egit use manual Eight _ resolve push conflicts

Source: Internet
Author: User

Multi-person collaborative development, in the case of push updates to the server will inevitably conflict, so push before you need to resolve the server side of the latest version and the local warehouse conflict. Pull operation is to the server-side updates to the local warehouse to merge, resolve the merge conflict, you can successfully push to the server branch.

Assuming now that the Mairo brothers are working with git to develop the Newsupermairobro game, the server-side Mushroom.java file currently reads as follows:

Mairobro cloned the code, Mairo brother did the following modifications

Mairo's brother did the following modifications

Then Mairo brother first push code, Mairo brother. Use pull to merge local warehouses and remote warehouses, and the release file conflicts, when git automatically merges conflicting files, as shown in the following illustration:

Obviously automatically merged conflict files cannot be used directly, we can manually adjust, right button conflict files, select team-> merge Tool

The first is to compare the files that git automatically merged with the server-side files

The second is to use the local latest version of the file and server-side files for comparison, recommended this

The next step is the familiar contrast interface.

Mairo Brother changed the conflict file as follows

Then right click on this conflict file, select Team-> Add to index again to add the file to the index control, the file is not a conflict state, and can be committed and pushed to the server side

After resolving the merge conflict, Mairo brother only needs to pull the merged version of the server to the local, completing a collaborative development of the code merge. As you can see from the history, the history of mushroom begins with the branch, first the Mushrooma record, then the Mushroomb record, and the last History branch merges.

Related Article

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.