I'm using TFS with Git, installed Visual Studio Tools for Git.
I'm trying to pull all commits (5 in total) from TFS, but I get this error below:
An error occurred. Detailed message: An error was raised by libgit2.
Category = Checkout (MergeConflict).
2 conflicts prevent checkout
How do I resolve this?
I was able to resolve this by doing a pull from Team Explorer in VS 2013 without having any solution open. Just do this one time.
This worked, and since then I haven't seen libgit error for any other solution as well.
This is tested for VS 2012 as well.
This happens when your incoming fetch conflicts with your uncommitted files. first try to commit the changes you did or undo them. And try to push again. if it doesn't work, the conflict file should be in the Untracked files. Try to find it and delete it. this should work.
Got a hint from @Blowsie, in my case, turned off fiddler capturing or similar packet capturing tool.
For resolving the issue follow below steps:-
1)Close visual studio.
2)Now Open visual studio without opening any solution..
3)Open team viewer and then go to git home->changes..
4)Then click on commit..
5)Now you will get the unresolved conflicts..
6)Resolve the conflicts and commit..
Problem Resolved :).
Cheers