Eclipse EGit Checkout conflict with files: - EGit doesn't want to continue

前端 未结 9 1515
旧时难觅i
旧时难觅i 2021-01-30 09:02

I\'ve started Eclipse EGit. In some scenarios it is really not comprehensive.

I have local file e.g. pom.xml changed. On git server this file was changed. I do pu

相关标签:
9条回答
  • 2021-01-30 09:28
    1. After closing the Conflict Error Dialog; from the Project Explorer, right click on the head of the project -> Team -> Stashes -> Stash Changes
    2. Enter a name for your stash. E.G. "Conflict"
    3. Try Pulling again. Hopefully there are no errors this time.
    4. From the Git Repository view, expand your repository -> Stashed Commits
    5. Right Click on the stash you created in step 2 -> Apply Stashed Changes
    6. This brings up the merge tool if it can't automatically merge it.
    7. Manually resolve the merge conflicts in the file/s.
    8. Right Click on the file editor -> Team -> Add To Index
    9. If you are not ready to commit the file or just don't want it in the Index, right click on the file editor -> Team -> Remove from Index.
    10. Cleanup: From the Git Repository view, right Click on the stash you created in step 2 -> Delete Stashed Commit

    Your local working directory file should be be merged

    0 讨论(0)
  • 2021-01-30 09:30

    The proper solution is the one provided by @Jojo.Lechelt.

    However if you don't want to commit for any reason and still want to pull the changes,you may save your changes somewhere else,replace the conflicting file with HEAD revision and then pull.

    Later you can paste your changes again and compare it with HEAD and incorporate other people changes into your file.

    0 讨论(0)
  • 2021-01-30 09:31

    In Eclipse :-

    1. Right click -> click on 'add to index'

    Add conflict file in staged area

    1. Right Click ->click on commit

    Add conflict file in local repository

    1. Pull

    You will get all changes (change in remote repository and local repository)

    Changes mentioned as Head(<<<<<< HEAD) is your change, Changes mentioned in branch(>>>>>>> branch) is other person change, you can update file accordingly.

    1. Right click ->click on add to index

    2. Right click -> commit and push

    0 讨论(0)
提交回复
热议问题