git resolves Your local changes to the following files would is overwritten by merge:

Source: Internet
Author: User

Problem

In the same document, when you submit, someone updates the file and uploads it earlier than you so that your local file is not up-to-date. Therefore, when you want to upload your own modified files, the first step of Git pull, the following error is reported:

    error: Your local changes to the following files would be overwritten by merge:            src/test/resources/application_context.xml    Please, commit your changes or stash them before you can merge.    Aborting
To resolve this issue, do the following:
    1. Git stash

      • Hide local Modifications
    2. Git pull

      • Download the latest code
    3. Git stash pop

      • Read the last saved content from the git stack and restore your local modifications
    4. Prompt for conflict-free

      • If there is a conflict, resolve the conflict
      • If not, submit it directly
        • git add *
        • Git commit *-M "Comments"

git resolves Your local changes to the following files would is overwritten by merge:

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.