简体   繁体   中英

How to remove local git repositories in Visual Studio 2019?

In vs 2017 there was an option under Local Git Repositories -> right click "delete repository".

In vs 2019 there is no menu like that:

有关新 Git 菜单的信息

And in the new menu it seems that there is no option for deleting: 新的 Git 菜单

Of course I can delete the repositories manually, I am just wondering if there are any way to do it visual studio. Thanks for your help!

I had similar problem in VS2022 / Community edition. Have an unused branch already renamed, but its original name was still available in menu Git / Local Repositories... Matching that name (entry from the menu) in the project folder, showed me following:

  1. Simply try to locate a folder called (usually is hidden) in the root of your git archive folder.的文件夹(通常是隐藏的)。
  2. In this folder check for existence of folders having same name as your projects to remove from the menu - usually that folders points to empty directory tree!!
  3. in file explorer, better by VS switched off - delete it. That approach helped me.

just delete the.git file in your project directory and then refresh

if you can't find the.git file in your project it may be

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM