Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Sunday, January 19, 2014 9:15 PM | 1 vote
How do I remove local git repository from team explorer window when option Remove from context menu is always disabled?
All replies (9)
Tuesday, January 21, 2014 7:00 AM âś…Answered | 1 vote
Hi,
Through my research, if you open the project in local git repository from Solution Explorer first, the project will appear under the Local Git Repository automatically again even though you have removed it.
Please make sure the project is not opened in Solution Explorer when you check it in Team Explorer.
Thanks,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.
Monday, January 20, 2014 3:25 AM | 9 votes
Try connecting to another repository or team project then the Remove option should get enabled
Ahmed is an independent consultant in Ottawa, Canada specialized in .NET, Biztalk, WCF, WPF, TFS and other Microsoft technologies.
Blog: http://lajak.wordpress.com
Twitter: ahmedalasaad
Monday, January 20, 2014 8:05 PM
Hello Ahmed,
@Try connecting to another repository or team project then the Remove option should get enabled
I have created dummy repository, added it to Team Explorer, double clicked on new repository (it became bolded) and option Remove got enabled on my initial repository so I removed it.
Then I closed VS, reopened it and my dummy repository was the only listed.
So I manually deleted dummy repository from file system, closed VS, reopened it and my initial repository was displayed again?
Thursday, May 22, 2014 9:06 PM | 14 votes
Remove the hidden .git folder. That will remove it from Visual Studio.
Thursday, October 22, 2015 10:40 PM
This should be the accepted answer, the other one is useless
Tuesday, May 10, 2016 5:31 AM | 8 votes
Everyone,
I fought this for 3 hours. lplavoie is correct, but I want to give you the EXACT instructions for how to resolve:
1. Close Visual Studio.
2. Open Windows Explorer. Click the View tab, and check the "Hidden Items" check box.
3. In Windows Explorer, browse to the folder for your project or solution.
4. Delete the folder named .git
5. Open Visual Studio. Open the project or solution.
6. Click on the Team Explorer tab. The Git repository should be gone.
7. Throw a party.
You can now connect TFS, or not. At this point it is as if there was never Git source control.
Thursday, October 12, 2017 2:55 AM
Yes. this one works flawlessly. Thank you so much. Why would the GIT Folder be hidden? VS needs to address this.
Wednesday, July 11, 2018 8:34 AM
Remove the hidden .git folder. That will remove it from Visual Studio. I have just deleted the .git folder(it was hidden) from the project folder and I opened the solution in Visual Studio 2017 and it was no more attached to the git repository
Friday, September 7, 2018 11:11 PM
I double clicked on another repository to ensure that the context I was operating on was pointing to the branch I did not want to work on.
I was then able to delete the local git repository. The context menu delete option was now enabled. I'm using VS2017.