Conflicts Prevent Validation Error Using Git in Visual Studio

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

An error has occurred. Detailed message: The error was caused by libgit2. Cetegory = checkout (MergeConflict). 1 conflicts prevent validation

I have no idea what conflicts are and how to fix them. Can someone help me overcome this problem?

+62
git visual-studio visual-studio-2013 conflict
Dec 30 '14 at 15:46
source share
7 answers

I solved the same problem using the Git command line in Visual Studio because it gives you more options:

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

You can also install this extension to make it easier to work with (this gives you the option to not enter passwords every time):

http://gitcredentialstore.codeplex.com/

Then I used the following commands:

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

additional information about the 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 that this is due to the "conflict between your changes and changes from another branch."

+50
Apr 18 '14 at
source share

You have some unmanageable changes. Commit or discard these changes, and then Git "pull" will work.

+33
Dec 11 '14 at 20:13
source share

I experienced this problem during a pull request through Visual Studio.

A hidden file has been modified: .ntvs_analysis.dat

To detect this hidden file and fix the problem, I:

  • Hidden & dagger; files are displayed to see if there were changes in the files that I could not see.
  • The project directory uses the Git GUI to undo the modification of the hidden file that I found.

After that, my pull request was successful.




& dagger; Control Panel => Folder Options => View => Show Hidden Files and Folders

+3
Apr 02 '15 at 14:05
source share

if you have some changes in local then you just make your changes and don't sync this commit

changes => Enter Commit Message => Commit and do not sync this commit, then you can pull correctly

if you have no changes in your branch, then go to Actions => Open Comment Prompt =>, then enter these lines

  • git pull

  • git stash

3.git pull

0
Oct 25 '15 at 6:39
source share

Our environment requires us not to rely on the restoration of the Auto Nuget package, and my problem is related to:

  • Some members use the GIT command console to commit / extend / push.
  • I rely on the VS2013 GIT tools to accomplish Commit / pull / push.
  • GIT Management Team pushes all content in package folder
  • Visual Studio Tools Ignore Package Folder

So, the conflict was caused by the files in the package folder, which they tried to add via VS pull, but already existed on the hard drive. For now, I just deleted the folder / files of the corresponding packages and canceled the pull action, which worked.

Hope this helps.

0
Nov 01 '15 at 23:28
source share

I had this problem and I decided that it was "brute force" ... I did not have any changes in the commit, and I was not going to synchronize, but still got this error, trying to extract some changes that another developer clicked

I ended up just hitting a local repo in the file system and re-cloned the remote branch. Voila!

This may not be the most elegant solution, but it works if you do not have local changes that you worry about losing.

0
Jan 26 '16 at 15:44
source share

This sounds like the result of not adding executable files and other automatically generated output from Visual Studio to the .gitignore file. You do not want the source to control these files. Read more about it here.

0
Jun 16 '16 at 20:41
source share



All Articles