문제

When my partner attempts to commit his update to BitBucket, he comes across the following error:

Repository State: Conflicts

The IDE does not tell us any further details about the conflicts and does not mark any issues in his code.

What is going on and how can we fix this?

도움이 되었습니까?

해결책

If you do not have any uncommitted change then do a hard reset from Team > reset > (select Hard option) do a pull request again. find all the conflicted file(file with red diamond icon) Resolve any conflict (manually edit the file, or use merge tool),

then right click on all(one by one ) conflicting files, select "team", then select "Add to Index".

(if every conflict is resolve then there should not be any conflict(red diamond) icon. before trying to commit anything make sure all the conflict is revolved)

now you should be able to commit to git again

다른 팁

I am not exactly sure what is causing the conflict, but your partner should be able to see which files are conflicting by looking for a red diamond inside the Package Explorer. Resolve any conflict (manually edit the file, or use merge tool), then right click on all conflicting files, select "team", then select "Add to Index". After that, your partner should be able to commit to git again.

I hope this helps!

I know this is an old post but I ran into this problem yesterday. I had this Repository State: Conflicts message when I was trying to commit after removing all the conflicts. As I couldn't see anything wrong in Eclipse, I opened GitHub Desktop and it did show me straight away what was wrong. I work on MacOS X and there was a .DS_Store file in the workspace. This was the file where the conflict was. Eclipse wouldn't show it but thanks to GitHub Desktop, I managed to remove the conflict and then I could commit my changes in Eclipse. I hope it helps.

Sometimes there are files in projects that are not shown by IDEs. You should use git console commands like "git status" to check for those files, manually merge and add them by "git add filename". When all the conficting files are completed, you can commit again.

In my case there is a .gitattributes file which is not visible to eclipse since it's not in any of the eclipse projects. It also had conflicts and was preventing the merge from being resolved. I had to do that one outside of eclipse and then do a refresh in eclipse.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top