简体   繁体   English

适用于Windows的Visual Studio GitHub

[英]GitHub for Windows with Visual Studio

I installed VS and GitHub for Windows. 我为Windows安装了VS和GitHub。 Now, I clone reporisotries using VS and then use GitHub for Windows for shell prompt etc. 现在,我使用VS克隆子仓库,然后将GitHub for Windows用于shell提示等。

On VS however, it notifies that I need to install 3rd-party tools for GitHub command prompt support. 但是,在VS上,它通知我需要安装第3方工具才能获得GitHub命令提示符支持。 On "Changes" screen in Team Explorer, if I open command prompt (under Actions) type "git", it doesn't recognize the command. 在团队资源管理器的“更改”屏幕上,如果我打开命令提示符(在“操作”下),则键入“ git”,它将无法识别该命令。

If I open the 3rd-party tools link and install, it installs another full-fledged git software and then let me use the command prompt. 如果我打开并安装了3rd-party工具链接,它将安装另一个完整的git软件,然后让我使用命令提示符。

Is there a way to integrate GitHub for Windows with VS, such that we don't require a duplicate git installation? 有没有一种方法可以将Windows的GitHub与VS集成在一起,从而使我们不需要重复的git安装?

I came across the same problem. 我遇到了同样的问题。 I could not find a way to get the GitHub Desktop (formerly GitHub for Windows) application to work with Visual Studio (or the Windows Command Prompt in general). 我找不到让GitHub桌面(以前为Windows的GitHub)应用程序与Visual Studio(或通常的Windows命令提示符)一起使用的方法。

So the way I solved this is that I installed Git for Windows . 因此,解决此问题的方法是安装了Windows版Git I recommend installing it with administrator rights, that way it gets installed to the Program Files folder by default. 我建议以管理员权限安装它,这样默认情况下会将其安装到Program Files文件夹中。 It's not necessary though, if installed normally, it gets installed to a subfolder in the user's AppData folder by default. 但是,如果正常安装,则没有必要,默认情况下会将其安装到用户的AppData文件夹中的子文件夹中。 If you select the proper options during install (it's very straightforward, just read the description of the available options), it will be possible to use it from Visual Studio (and the Windows Command Prompt). 如果在安装过程中选择了适当的选项(非常简单,只需阅读可用选项的说明),就可以从Visual Studio(和Windows命令提示符)中使用它。 Once you have that, having the GitHub Desktop application and its shell isn't necessary anymore, as you can do everything from within Visual Studio. 一旦有了它,就不再需要拥有GitHub Desktop应用程序及其外壳,因为您可以在Visual Studio中进行所有操作。 You can browse your repositories, create new branches, open a Command Prompt and use git within it, etc. 您可以浏览存储库,创建新分支,打开命令提示符并在其中使用git等。

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

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