I'm using Visual Studio Premium 2013 Update 5 to manage a Solution consisting of several projects. My last successful commit to Visual Studio Online was the evening of October 18th. My computer rebooted the morning of the 19th and installed a bunch of Microsoft updates. I did some minor development work on the 19th. When I went to commit my changes, I noticed that the Commit option was not available when I did a right click on the Solution within Solution Explorer.
Upon investigating why I can't do a commit, I noticed the following behavior. I open a file, make a change and the red check appears next to the file name and the file appears under Included Changes. When I save the file, the red check disappears and the file disappears from Included Changes. Since there are no changes being tracked by Git, there is nothing to commit to Visual Studio Online. I also noticed the the Git repo (/Portal) for the Project was missing from the Team Explorer - Manage Connections - Local Git Repositories section.
I then opened another Solution using Visual Studio 2015 Ultimate Update 3 and I noticed my Git repo (/Portal) under Manage Connections. I was then able to do a Git Status and found the following issue. See image below.
Since my Git repo (/Portal) was missing, I went ahead a Cloned the Solution again using Visual Studio 2013. Visual Studio created a new Git repo (/Portal 2) and it now shows my original repo (/Portal) as well. My recent changes are still missing from Included Changes, so it's still not working correctly.
At this stage, I'm not sure if the corrupt file is the issue or if Update 5, which was downloaded months ago, but appears to have been installed on the 19th or 20th is the issue.
UPDATE 1:
Asked to run git fsck. Here are the results.
UPDATE 2:
Based on the code_fodder comment, I went ahead and tested making a code change using the new repo (/Portal 2). It works as expected. I made a change to a file and the red check still displayed after I saved the file. I also ran Git Status and there were no reported issues.
UPDATE 3:
The last statement (git push -u origin share) produces the following error.
The Share branch is missing from the Git UI as well.
Any help is much appreciated.