Reputation: 11340
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?
Upvotes: 33
Views: 46678
Reputation: 27
If it not working you have a second option by using terminal.
Upvotes: 0
Reputation: 27
1.Try to pull the project from cmd or git-bash by going into your project directory. if this solution is not correct for you.
you might cross your limit of using total users of your account. so try the second one. I got a solution by the second one.
2.This problem needs to increase your User limit in the bitbucket, Otherwise, delete someone's privileges from your list and add another one.
Upvotes: 0
Reputation: 1
First you need to commit local pending changes in local branch.then pull from master branch. resolved conflicts and push the local changes on master branch
Upvotes: 0
Reputation: 1
Incoming and Outgoing commits in different branches. You must to marge them before sync. I do it in Source Tree, there you can clearly see branching.
Upvotes: 0
Reputation: 375
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.
Upvotes: 0
Reputation: 181
To see the error you should run git command line
You can find it at Team Emplorer
-> Unsynched commits
-> Actions
-> Open in Command Prompt
Then you should use git pull command
Be careful with credential if you are using visualstudio.com
,
in this case you must have an alternative login and password for connect to git from command prompt.
Upvotes: 16
Reputation: 2958
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.
Upvotes: 0
Reputation: 4792
Visual Studio Tool for Git didn't supported the remote repositories using the SSH protocol, only HTTP and HTTPS were supported but now it supports SSH as well.
See the url on how to resolve this- https://github.com/libgit2/libgit2sharp/issues/255
Upvotes: 1
Reputation: 79
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
Upvotes: 7
Reputation: 25050
Got a hint from @Blowsie, in my case, turned off fiddler capturing or similar packet capturing tool.
Upvotes: 0
Reputation: 40535
This error often occurs when:
You have a proxy on your network:
See some solutions on configuring your git proxy settings here.
or... The git url you are trying to connect to is over 256 characters
Upvotes: 5
Reputation: 41802
Sadly, the Visual Studio plugin for Git doesn't display the error messages you need to troubleshoot this problem. (I hope they plan that feature for a later release.)
Try pulling the latest commits using Git Bash or using TortoiseGit. Either of those tools should let you know where your conflicts are.
Upvotes: 20