Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 pull, EGIt says:

Checkout conflict with files:

i.e. pulling stops (fetch is done, but not merge), that is OK. However the next is bad experience.

I synchronize workspace, put my changes aside and make it the same as FETCH_HEAD. But EGit doesn't want to continue. I replace the file with HEAD revision. But EGit still doesn't want to continue.

What standard expected user operation should be with EGit after conflict resolution?

UPDATE:

I added to index, then marked as Merged -> pull still can't pass.
When I select Merge I get the dialog

enter image description here

I can't commit the file as it is not in list of changed files.

like image 411
Paul Verest Avatar asked Aug 05 '13 03:08

Paul Verest


People also ask

How do you commit an EGit?

If you want to commit the changes to your repository, right click the project (or the files you want to commit) and select Team => Commit… . This will open a new window, allowing you to select the files you want to commit. Before you can commit the files, you will have to enter a commit message in the upper textbox.

What is Eclipse EGit?

Eclipse EGit™ EGit is an Eclipse Team provider for the Git version control system. Git is a distributed SCM, which means every developer has a full copy of all history of every revision of the code, making queries against the history very fast and versatile.


2 Answers

Situation:

  • You have local uncommitted changes
  • You pull from the master repo
  • You get the error "Checkout conflict with files: xy"

Solution:

  • Stage and commit (at least) the files xy
  • Pull again
  • If automerge is possible, everything is ok.
  • If not, the pull merges the files and inserts the merge-conflict markers (<<<<<<, >>>>)
    • Manually edit the conflicting files
  • Commit and push
like image 114
Jojo.Lechelt Avatar answered Oct 23 '22 14:10

Jojo.Lechelt


This is the way I solved my problem:

  1. Right click the folder that has uncommitted changes on your local
  2. Click Team > Advanced > Assume Unchanged
  3. Pull from master.

UPDATE:

As Hugo Zuleta rightly pointed out, you should be careful while applying this. He says that it might end up saying the branch is up to date, but the changes aren't shown, resulting in desync from the branch.

like image 21
Burak Karakuş Avatar answered Oct 23 '22 16:10

Burak Karakuş