VisualStudio: An error was raised by libgit2. Cate

2019-03-17 04:47发布

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?

error

10条回答
ゆ 、 Hurt°
2楼-- · 2019-03-17 05:21

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.

查看更多
放荡不羁爱自由
3楼-- · 2019-03-17 05:23

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.

查看更多
兄弟一词,经得起流年.
4楼-- · 2019-03-17 05:25

Got a hint from @Blowsie, in my case, turned off fiddler capturing or similar packet capturing tool.

查看更多
我想做一个坏孩纸
5楼-- · 2019-03-17 05:27

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

查看更多
登录 后发表回答