简体   繁体   English

不使用Git本身安装Git-TFS

[英]Installing Git-TFS without Git itself

Currently, the only way to install the Git-TFS bridge is through Chocolatey . 目前,安装Git-TFS桥的唯一方法是通过Chocolatey When I tried it, however, it appears to install Git (for Windows) along with the actual Git-TFS package. 但是,当我尝试它时,它似乎安装了Git(对于Windows)以及实际的Git-TFS包。 I already have Git installed on my work machine, so I don't need it to modify/remove what's already there. 我已经在我的工作机器上安装了Git,因此我不需要它来修改/删除已存在的内容。

Is there a way to force Chocolatey not to modify my current Git install and just put in the Git-TFS package? 有没有办法强迫Chocolatey不要修改我当前的Git安装并只是放入Git-TFS包? If there is, how do I configure it to use with my current Git install? 如果有,如何配置它以用于我当前的Git安装?

I can't speak for other git clients, but if you're using the git-bash shell, you can download the source for git-tfs from github, compile it, and put it anywhere on your system and add that location to your path environment variable. 我不能代替其他git客户端,但是如果你正在使用git-bash shell,你可以从github下载git-tfs的源代码,编译它,并将它放在你的系统的任何地方并将该位置添加到你的路径环境变量。 The shell will find git-tfs and hook it in. shell会找到git-tfs并将其挂钩。

The easiest way would be to let the bridge install Git, while keeping your Git installation in a custom directory, which you can easily do with the Portable application for official Git for Windows (ie a seup you can simply uncompress anywhere you like). 最简单的方法是让桥安装Git,同时将Git安装保存在自定义目录中,您可以轻松地使用适用于Windows的官方GitPortable应用程序 (即您可以在任何您喜欢的地方轻松解压缩)。

From there, using your git installation is mainly about catching your global config settings, which are in %HOME%/.gitconfig . 从那里开始,使用git安装主要是捕获全局配置设置,这些设置位于%HOME%/.gitconfig So make sure you have HOME defined, and bot git (yours and the one installed by the bridge) will use those. 因此,请确保您已定义HOME ,并且bot git(您的和桥上安装的那个)将使用这些。


Now if you don't need a portable installation (or a full recompilation like edwinf suggests in his answer ), then ferventcoder (member of the chocolatey organization ) suggests in the comment to look at/comment on issue 131 : 现在,如果您不需要便携式安装(或者像edwinf他的回答中建议的完整重新编译),那么ferventcoder巧克力组织的成员)在评论中建议查看/评论问题131

Add a switch for ignoring dependencies on install (Something like -ignoredependencies ) 添加一个用于忽略安装依赖项的开关(类似于-ignoredependencies

You could download git-tfs . 你可以下载git-tfs

No need to use chocolatey! 不需要使用巧克力! (But chocolatey is a very good tool ;)) (但巧克力是一个非常好的工具;))

只需下载并解压缩最新版本,然后将该目录放入PATH即可。

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

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