Visual Studio 2013 Github commit deadlock

git, visual-studio-2013

Solution

As dumb as it sounds, I just went to the command line, and it worked.

- Git status

- Git pull

- Git push

all worked fine.

If I did that same thing within Visual Studio, it didn't work. Go figure.

Problem

A few friends and I are working on a project via GitHub. We are all sharing the same branch, which may or may not be a good idea. I edited some of the code and committed the changes. I went to push commit to GitHub (I am working with Visual Studio 2013 and it's built-in Git tool), but I got this error: "There are new remote changes. You must pull them before you can push." So I tried to pull the remote changes and I get this error: "An error occurred. Detailed message: An error was raised by libgit2. Category = 21 (MergeConflict). 9 uncommitted changes would be overwritten by merge" I tried to change branches so that I might be able to push my changes and then merge them with the first branch, but I got this error: "Cannot switch to master because there are uncommitted changes. Commit or undo your changes before you switch branches. See the Output window for details." I have no idea what to do, except possibly to email my changes to one of my friends and have them push my changes. However, I don't know what would happen with my local commits. EDIT The problem is resolved. After making sure to sync all the commits I opened git bash and pulled the remote commits. After a few attempts I went back to Visual Studio and discovered that it had registered the merge. I resolved all of the conflicted files and was able to push the project. Thanks to everyone who answered!

Original source