git - 没有 Git for Windows 或 Github 扩展的 Visual Studio Git 源代码管理

标签 git visual-studio visual-studio-2015 version-control

在团队资源管理器中,它提示我安装第 3 方 git 工具,我不打算使用 Git 命令行,只是使用 Visual Studio 的 native GUI 来克隆、 pull 、提交、同步、 merge 以及可能发出 pull 请求。

那么我需要安装第 3 方 Git 命令提示工具(或 Github 扩展)吗?因为我已经安装了 2.10.1 并且没有发现任何不同。如果我这样做我会得到什么,如果我不这样做我会失去什么,因为我想要一个干净的最小安装,并且那里的所有教程和文档都假设我必须安装它们。

最佳答案

这可能符合 recent tweet来自 Edward Thomson (也在 Stack Overflow 上):

I don't mind @VisualStudio removing libgit2 and moving to git, they had good reasons but the "it acts different" excuse it reads like FUD.

There are good reasons for them to move to git: maintaining libgit2 in VS was a nightmare. (I know! I used to do it!)

And why pay to hack on (or around) libgit2 when they employ a Git for Windows maintainer?

他在这里谈论Johannes Schindelin , 谁 got employed by Microsoft last August 2015 , 谁在发布 Git for Windows editions .

Totally makes sense for them to move.

所以直到最近,Visual Studio 才使用第三方 Git 客户端,但现在它使用了 Visual Studio 15(如 commented by jessehouwing,VS 2015 没有自带 git .exe,它使用一个库来代替)。

这是 Visual Studio 15 Preview 5 (不是 Visual Studio 2015,即 v14.25123.xx)
参见 ycombinator.com :

Seems a shame the "15" team have given up on libgit2. Considering Microsoft have / are a contributor and presumably all contributing parties have the same goal (cross platform, feature parity etc) one has to wonder what's so bad with libgit2 it's been dropped in favour of shelling out to git.exe?

通过删除 libgit2,他们释放了一些内存。显然,VS 和 git 的整体内存使用量可能增加,但 VS 团队受到鞭打,直到内存使用量减少,因为没有人会优先考虑使其成为 64 位应用程序


OP 要求:

as a matter of fact I'm using VS "15" Preview 5. So does that mean I'll need to install Git for Windows or is it already shipped with VS 15? And if so why does it still prompt me to install it? – Jonney Shih 3 mins ago

jessehouwing答案:

A very minimal version ships with Visual Studio. But it's not added to the path. So Visual Studio doesn't rely on you installing it.

It's installed here: enter image description here

The best way to install a git client for your own command line escapades, is to install Git for Windows along side Visual Studio. If you've done so, you can dismiss the prompt from Visual Studio

就个人而言,我喜欢通过解压最新的存档来“安装”Git,例如:PortableGit-2.10.1-64-bit.7z.exe任何我想要的地方。

关于git - 没有 Git for Windows 或 Github 扩展的 Visual Studio Git 源代码管理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40058906/

相关文章:

bash - 如何按日期自动压缩 git 历史记录?

android - 如何将android项目添加到git

java - JGit 删除一个 git 仓库

git - 这个文件是 stash 的 - github 错误

javascript - 如何克服 typescript 的传播运算符限制?

C# 需要解释涉及类之外的变量的事情

c# - VS 2015 MVC6 引用/依赖错误

c# - 有没有一种简单的方法可以使 Visual Studio 2015 使用特定的 ToolsVersion?

visual-studio - Azure Functions Visual Studio 2017 15.3 错误

asp.net-mvc - 如何确定 Visual Studio 2015 项目中使用哪种身份验证方法?