Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CheckoutConflictException while Pull and merge #90

Open
Git-Mani opened this issue Sep 10, 2024 · 2 comments
Open

CheckoutConflictException while Pull and merge #90

Git-Mani opened this issue Sep 10, 2024 · 2 comments

Comments

@Git-Mani
Copy link

I often have this error during Pull :

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

This error occurred very frequently . What could be the possible reason ?
Please refer screenshot for more detail.
conflictexception

@msohn
Copy link
Member

msohn commented Sep 10, 2024

CheckoutConflictException is thrown if you try to checkout some file which was modified locally and this modification isn't yet tracked in git. This is done to prevent that checking out a version of that file would have the effect that you would loose this local modification.

@ansregianne
Copy link

@msohn I am fairly confident that the answer to my question is "yes", but I would like to confirm.

Would the following scenario cause this issue:

  1. Assume that there is an existing Git repository where File A exists and has been modified over time.
  2. A user checks out the repository (now referred to as checkout-1)
  3. A different user checks out the repository from the same origin (now referred to as checkout-2)
  4. User-1 modifies File A in checkout-1 and pushes it back to the origin
  5. User-2 modifies File A locally in checkout-2 and then performs a git pull where the pull would bring the new modification from User-2

Would step 5 meet the conditions to cause the error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants