Monday, December 2, 2013

Visual Studio and Git - handling deleted repository

I created a Git repository in TFS and then renamed it.
The problem was Visual Studio still insisted to clone with the old name! And in attempt to connect I recevied :
An error was raised by libgit2. Category = Net (Error).

Of course, the repository didn't exist any more. So I tried to refresh, restart and etc, to let Visual Studio figure out that repository has a new name. Nope, no way.

So I found where those properties are locally saved -
C:\Users\my.user\AppData\Roaming\Microsoft\VisualStudio\12.0\Team Explorer\GitTeamProjects.config

Inside it looks like:
...
<project name="Inmeta" projectUri="...">
      <repository name="OldRepositoryName" guid="896f85d7-b840-48ed-92d5-74b223b34f66" />
</project>

...

I just deleted the whole line staring with <repository... and restarted Visual Studio.
And voila - the new repository name was discovered and shown correctly to clone :)

1 comment: