Visual Studio:更改 GIT 插件存储库的默认路径
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27134077/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Visual Studio: Change default path for repositories for GIT plugin
提问by SuperJMN
I want to clone a GitHub repository from Visual Studio and the default path is C:\Users\[User]\Sources\Repos\[NameOfProject]
.
我想从 Visual Studio 克隆一个 GitHub 存储库,默认路径是C:\Users\[User]\Sources\Repos\[NameOfProject]
.
How to change it? Every time I create or clone a repo, the path remains the same.
如何改变它?每次我创建或克隆一个 repo 时,路径都保持不变。
回答by Demodave
In Visual Studio 2015 / 2017 / 2019:
在 Visual Studio 2015 / 2017 / 2019 中:
- Click The Home Button in Team Explorer
- Click on Settings
- Click on Global Settings under Git
(Note: may not appear if you have no cloned git repos) - Alter the Path for the Default Repository Location
- Click Update
- 单击团队资源管理器中的主页按钮
- 点击设置
- 点击Git下的Global Settings
(注意:如果没有克隆git repos可能不会出现) - 更改默认存储库位置的路径
- 点击更新
回答by BikeMrown
For VS2013 v4+ and VS2015
对于 VS2013 v4+ 和 VS2015
Click on "Settings" (from either the project Home menu or from the top dropdown menu), then select "Git Settings." You will see a Global Setting of "Default Repository Location" (the one you want). Change it and click Update.
单击“设置”(从项目主菜单或顶部下拉菜单中),然后选择“Git 设置”。您将看到“默认存储库位置”的全局设置(您想要的)。更改它并单击更新。