Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Conflicts prevent checkout" error using Git in Visual Studio

I am using Git in Visual Studio. When I am trying to synchronize, the following message appears:

An error occured. Detailed message: An error was raised by libgit2. Cetegory = checkout(MergeConflict). 1 conflicts prevent checkout

I don't have a clue about what the conflicts are and how to fix them. Can anyone help me overcome this problem?

like image 978
Jim Blum Avatar asked Dec 30 '13 15:12

Jim Blum


People also ask

How do you resolve checkout conflict?

Conflict occurs when your changes cannot be merged with what is coming in because the changes are essentially on the same line. You have two options either to revert your change or manually merge the changes and commit it later.

What does checkout branch mean in Visual Studio?

You can choose an existing local or remote branch as the base. The Checkout branch checkbox automatically switches you to the newly created branch. The equivalent command for this action is git checkout -b <new-branch><existing-branch> .


1 Answers

I have solved the same problem by using the Git command prompt in Visual Studio, because it gives you more ability:

http://msdn.microsoft.com/en-us/library/vstudio/dd286572.aspx

You also may install this extension to facilitate the work with it (it gives you ability do not enter passwords each time):

http://gitcredentialstore.codeplex.com/

Then I used this commands:

git pull // I got an error on this step git stash git pull 

more information about commands here:

http://git-scm.com/docs/git-pull

http://git-scm.com/book/en/Git-Tools-Stashing

http://git-scm.com/docs/git-commit

And as CharlesB said it is due to "conflict between your changes and the changes from another branch".

like image 188
Maks Avatar answered Sep 23 '22 13:09

Maks