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条回答
我想做一个坏孩纸
2楼-- · 2019-03-17 05:08

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.

查看更多
三岁会撩人
3楼-- · 2019-03-17 05:10

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

查看更多
beautiful°
4楼-- · 2019-03-17 05:11

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.

查看更多
干净又极端
5楼-- · 2019-03-17 05:12

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

查看更多
女痞
6楼-- · 2019-03-17 05:15

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

查看更多
劳资没心,怎么记你
7楼-- · 2019-03-17 05:17

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.

查看更多
登录 后发表回答