简体   繁体   English

Visual Studio 2019 在创建新的 Git 存储库时没有 GitLab 选项

[英]Visual studio 2019 no option for GitLab when creating a new Git repository

After an update to git extension for Visual studio 2019, the Git functionality has moved from Team Explorer to a new option called Git Changes.在更新到 Visual Studio 2019 的 git 扩展后,Git 功能已从团队资源管理器移至名为 Git 更改的新选项。

I've created a new solution in VS, then added it to source control using the option from File menu.我在 VS 中创建了一个新的解决方案,然后使用文件菜单中的选项将其添加到源代码管理中。 I then clicked on Git changes -> Create Git Repository...然后我单击 Git 更改 -> 创建 Git 存储库...

This opens up the following window:这将打开以下 window:

对话框创建 Git 存储库...

As you can see there is no option for GitLab there.如您所见,那里没有 GitLab 选项。 I can only create a new repository in GitHub but there is nothing there for GitLab.我只能在 GitHub 中创建一个新的存储库,但 GitLab 没有任何内容。

I already have the GitLab VS extesion installed and updated and I've already created many other repositories in GitLab in the past from inside VS.我已经安装并更新了 GitLab VS extesion,并且过去我已经从 VS 内部在 GitLab 中创建了许多其他存储库。 But I can't find a way to do this anymore.但我再也找不到办法做到这一点了。 Is there something I'm missing here?我在这里缺少什么吗?

Microsoft bought Github in 2018 and since VS is a Microsoft product, they're likely trying to encourage users to move to Github instead of its competitors.微软在 2018 年收购了 Github,由于 VS 是微软的产品,他们可能会试图鼓励用户转向 Github 而不是竞争对手。 However, it looks like that "Existing remote" option is what you want (on the left under Other).但是,看起来“现有远程”选项是您想要的(在“其他”下方的左侧)。 You should be able to provide the remote url from Gitlab there.您应该能够从 Gitlab 那里提供远程 url。

Go to Tools > Options > Environment > Preview Features and then toggle the New Git user experience checkbox, which will switch you back to Team Explorer for Git. Go 到工具 > 选项 > 环境 > 预览功能,然后切换新的 Git 用户体验复选框,这会将您切换回 Git 的团队资源管理器。

How to use the full Team Explorer experience in Visual Studio 如何在 Visual Studio 中使用完整的 Team Explorer 体验

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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