Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » CheckoutConflictException during Pull
CheckoutConflictException during Pull [message #665639] Fri, 15 April 2011 10:42 Go to next message
sylvain.pras is currently offline sylvain.prasFriend
Messages: 9
Registered: April 2011
Junior Member
I often have this error during Pull :

Exception caught during execution of merge command. org.eclipse.jgit.errors.CheckoutConflictException: Checkout conflict with files: etc ....

It happen when i have a modified file in my working directory, and there's a concurrent modification on the same file in the remote repository.

Why Egit doesn't manage to pass the file in merge satus, to let us resolve conflicts ?

Re: CheckoutConflictException during Pull [message #666125 is a reply to message #665639] Tue, 19 April 2011 08:08 Go to previous messageGo to next message
Stefan Lay is currently offline Stefan LayFriend
Messages: 342
Registered: July 2009
Senior Member
"Sylvain PRAS" <sylvain.pras@addonline.fr> wrote in message
news:io9709$bt6$1@news.eclipse.org...
>I often have this error during Pull :
>
> Exception caught during execution of merge command.
> org.eclipse.jgit.errors.CheckoutConflictException: Checkout conflict with
> files: etc ....
>
> It happen when i have a modified file in my working directory, and there's
> a concurrent modification on the same file in the remote repository.
>
> Why Egit doesn't manage to pass the file in merge satus, to let us resolve
> conflicts ?

This is done on purpose, and is the same in native git. The merge which is
done during pull already merges the file from the pulled branch with the
file in your HEAD commit. When there are additional changes in your working
directory or even in your index, the merge would be way too complex.

Please have a look at the git docu
http://www.kernel.org/pub/software/scm/git/docs/git-merge.ht ml, "PRE-MERGE
CHECKS": "git pull and git merge will stop without doing anything when local
uncommitted changes overlap with files that git pull/git merge may need to
update."

Stefan
Re: CheckoutConflictException during Pull [message #666605 is a reply to message #665639] Thu, 21 April 2011 09:46 Go to previous messageGo to next message
sylvain.pras is currently offline sylvain.prasFriend
Messages: 9
Registered: April 2011
Junior Member
Thank you very much,

I suspected that i should commit my modificatons in the local repository before "pulling"; you confirm that.
icon8.gif  Re: CheckoutConflictException during Pull [message #1718489 is a reply to message #666125] Thu, 24 December 2015 15:47 Go to previous messageGo to next message
ANGEL VILLAFRANCA is currently offline ANGEL VILLAFRANCAFriend
Messages: 4
Registered: December 2015
Junior Member
Done on purpose? It used to work marvelous, when you did a pull (or applied a stash) it automatically merged what it could and marked as "conflicting" those files with changes that couldn't be automatically merged leaving it for the developer to fix the conflict either by accepting "our" or "their" version or by manually fixing it (using the merge tool or editing the file).

Now the plugin is completely dumb, I get an exception and that's it .... I can't even stash my changes because later I won't be able to apply them I'll get the same exception.
Re: CheckoutConflictException during Pull [message #1718704 is a reply to message #1718489] Tue, 29 December 2015 11:04 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
You described the difference between a merge conflict and a checkout conflict. Also native git refuses to
merge or rebase if that would affect a file which is modified in the working tree. [1] says:
"If any of the remote changes overlap with local uncommitted changes, the merge will be automatically cancelled and the work tree untouched."
Re: CheckoutConflictException during Pull [message #1718705 is a reply to message #1718704] Tue, 29 December 2015 11:04 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
[1] https://www.kernel.org/pub/software/scm/git/docs/git-pull.html
Re: CheckoutConflictException during Pull [message #1718735 is a reply to message #1718704] Tue, 29 December 2015 15:34 Go to previous messageGo to next message
ANGEL VILLAFRANCA is currently offline ANGEL VILLAFRANCAFriend
Messages: 4
Registered: December 2015
Junior Member
That why I stashed my changes but as I said before " I can't even stash my changes because later I won't be able to apply them I'll get the same exception" (I end up resetting - loosing everything, then pulling making again all my changes and committing/pushing)

having got through the pain above described next time I was on a similar situation I committed (just commit, no push) my changes (when the pull failed) then pulled and .... surprise - dirty_worktree error

catch 22?
Re: CheckoutConflictException during Pull [message #1718736 is a reply to message #1718735] Tue, 29 December 2015 15:47 Go to previous messageGo to next message
ANGEL VILLAFRANCA is currently offline ANGEL VILLAFRANCAFriend
Messages: 4
Registered: December 2015
Junior Member
interesting .... updated my eclipse plugin to its latest version and now it works as described on my previous comments .... just the way it used to be ...
Re: CheckoutConflictException during Pull [message #1718737 is a reply to message #1718735] Tue, 29 December 2015 15:48 Go to previous message
ANGEL VILLAFRANCA is currently offline ANGEL VILLAFRANCAFriend
Messages: 4
Registered: December 2015
Junior Member
interesting .... updated my eclipse plugin to its latest version and now it works as described on my previous comments .... just the way it used to be ...
Previous Topic:How do I compare two different repository?
Next Topic:Git Repository Failed Due To Java Heap Space Issues
Goto Forum:
  


Current Time: Thu Apr 18 14:45:57 GMT 2024

Powered by FUDForum. Page generated in 0.02298 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top