GIT-----Collection---conflict issues

Source: Internet
Author: User

1. In the event of a conflict, the following information is indicated:

' c/environ.c ' would is overwritten by merge.  Aborting.please, commit your changes or stash them before you can merge.

This means that there is a conflict between the updated content and the locally modified content, either by committing your changes or by temporarily storing the local changes first.

The process is very simple, mainly using the git stash command for processing, divided into the following steps to deal with.

(1) Store local Modifications first

$ git stash

This allows all local modifications to be temporarily stored. You can see the saved information in Git stash list: where [email protected]{0} is the tag you just saved.

2. Pull Content

$ git pull

3. Restore staged content

$ git stash pop [email protected]{0}

The system prompts similar information as follows:

Auto-merging c/ in C/ENVIRON.C

This means that the system automatically merges the modified content, but there are conflicts that need to be resolved.

4. Resolve conflicting parts of the document

Open the conflicting file and you will see something similar to the following:

<<<<<<< Updated Upstream
Color: #0000FF
=======
Color: #BB911B
>>>>>>> stashed changes

The content between updated upstream and ===== is the content of pull down, and the content between = = and stashed changes is locally modified content. In this case, Git does not know what line of content is needed, so you have to decide what you want.

Once the resolution is complete, you can submit it as expected:

5.git add-a or git Add.

The 6.git commit steps are as follows:

I[gas_alertsystem] Description text refs # 137 Esc:wq

7.git push

GIT-----Collection---conflict issues

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.