Git conflict resolution

Source: Internet
Author: User
Tags commit
Git conflict resolution

Reproduced from https://www.cnblogs.com/jason-beijing/p/5718190.html scene one
User0 has a new submission
User1 no pull---write new code---pull-and prompt conflicting

Workaround One
Stash Save (Save your own code), re-pull---stash pop (retrieve the hidden code saved), the code file will show the conflict right-click Edit conficts Page of Mark as resolved-Commit&push

Solution two (use as little as possible, the advantage of this approach is to deal with conflicts in the original editor, the code logic to see more clearly)
-Stash Save (Save your own code), re-pull, stash pop (retrieve the hidden code saved), the code file will show the conflict--right-click Select Resolve Conflict-> ; Open file conflict Resolution-Commit&push


Scene Two
User0 has a new submission
User1 no pull--write new code--Commit&push--prompt there is a conflict

Workaround One
The pull-and code file will show conflict-right-click on edit Conficts, and after you have clicked on the editing page, mark as resolved, Commit&push

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.