Visual Studio says that git is offline. Not just one git repo, but git itself. The option to connect to a new repo is gone and any existing projects will be opened in offline mode even when they are on the local machine.
Asked
Active
Viewed 3,595 times
1 Answers
4
Possible fixes:
Delete the contents of this folder, then restart Visual Studio.
%LOCALAPPDATA%\Microsoft\VisualStudio\12.0\ComponentModelCache
Switch the source control plugin to TFS (or another provider), then switch it back to "Microsoft Git Provider"
Open a different Git repository, then reopen the offline repo.
Uninstall unnecessary source control plugins (e.g. Ahnk SVN when only using Git projects)
The refs/head/master file got corrupted. Re-clone the repo

Jonathan Allen
- 68,373
- 70
- 259
- 447
-
1I am seeing the same problem in Visual Studio 2015. Deleting %LOCALAPPDATA%\Microsoft\VisualStudio\12.0\ComponentModelCache or %LOCALAPPDATA%\Microsoft\VisualStudio\14.0\ComponentModelCache doesn't seem to solve this. – Turbo Aug 17 '15 at 05:40
-
2Same problem for me as @Turbo, my problem was having Ahnk SVN installed. Uninstalled Ahnk and the problem went away. – Vern D. Aug 20 '15 at 22:05
-
1I had this problem in Visual Studio 2015 as well and deleting that folder didn't solve the issue. What worked for me was to open any other git local repository (you should add one if you don't already have) in the team explorer and then reopen my first repository again. – Sobhan Jan 13 '16 at 04:56
-
4In my case, this problem was because a different souce control plugin got selected (I work with multiple source controls: Git, TFS, etc.). The solution was to change source control plugin to "Microsoft Git Provider" in Tools -> Options -> Source Control -> Plug-in Selection. – Turbo Feb 29 '16 at 23:53
-
1@Turbo: thank you for your suggestion, switching the plug-in to TFS and then back to 'MS Git Provider' did the trick for me. – Jonas Hansel Apr 11 '16 at 21:10
-
1In my case, the refs/head/master file got corrupted. I tried copying the file from another developer but our projects were in a different state, so I had to re-clone the repo. – Savage Sep 14 '17 at 08:28