哪里是“本地Git存储库"?存储在Visual Studio 2015中的路径 [英] Where are "Local Git Repository" path stored in Visual Studio 2015

查看:323
本文介绍了哪里是“本地Git存储库"?存储在Visual Studio 2015中的路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

本地Git存储库"路径存储在哪里?

Where are "Local Git Repository" paths stored?

推荐答案

我正在使用VS2017,经过一番挖掘,我想我可能已经找到Visual Studio用来存储信息的位置.转到%AppData%\ Microsoft \ VisualStudio \ 15.0_ {instanceId} \ Team Explorer \ TeamExplorer.config.

I'm working with VS2017 and after a bit of digging, I think I may have found where Visual Studio is storing the information. Go to %AppData%\Microsoft\VisualStudio\15.0_{instanceId}\Team Explorer\TeamExplorer.config.

该文件中包含以下信息:

That file has information like the following in it:

    <!--This configuration file specifies the previously-configured connection details for Team Foundation Server.-->
<server_list>
    <server url="http://mytfsserver:8080/tfs" current="yes">
        <collection guid="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx" url="http://mytfsserver:8080/tfs/defaultcollection" name="mytfsserver\DefaultCollection" current="yes" autoload="yes">
            <project projectUri="vstfs:///Classification/TeamProject/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx" name="MyTeamProject" capFlagsScc="1" supportsGit="yes" active="yes" team="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx">
                <repository type="2" name="MyGitRepo" guid="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx" activeClone="C:\Repos\MyGitRepo" isFork="False" />
            </project>
        </collection>
    </server>

基于此,您可以知道MyGitRepo存储在C:\ Repos \ MyGitRepo中.我可以找到最佳方法来获取Visual Studio实例ID的方法是调用:

Based on this, you can tell that MyGitRepo is stored in C:\Repos\MyGitRepo. The best way I can find to get the Visual Studio instance ID is by calling:

 "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -property instanceId

这篇关于哪里是“本地Git存储库"?存储在Visual Studio 2015中的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆