Windows下的Git:MSYS或Cygwin? [英] Git under windows: MSYS or Cygwin?

查看:145
本文介绍了Windows下的Git:MSYS或Cygwin?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我计划将我的项目迁移到git,我目前想知道在Windows下是最好的和/或最稳定的选项。



我基本上有2.5个选项:


  1. MSYSgit

  2. 点击 Cygwin

  3. (aka 2.5)来自Cygwin提示的MSYSgit(考虑到已经安装了Cygwin git)。

注意:IMO Cygwin本身是一个很大的优势,因为你可以访问几乎所有的* nix命令行工具,因为在MSYSgit bash,你只能访问这些工具的一小部分。

解决方案

编辑(2)更多年后:2014年10月)



Johannes Schindelin 刚才解释(Oct. 2014) msysgit已淘汰


我们现在有一个 SDK - 这本质上是通过包管理器mingw-get管理的标准MinGW / MSys系统。



我们决定逐步淘汰名称msysGit(以及相同名称的GitHub组织),并在 Windows的Git (使用对应的GitHub对于面向Windows开发人员的Git的开发环境,使用名为Git for Windows的安装程序用于最终用户和Git for Windows SDK)。







编辑(3年后:2012年4月)



MsysGit(现在是在GitHub 上)是如果你想要一个轻量级的快速启动Git world:解压缩归档文件,启动 git-cmd .bat git-bash.bat ,您已完成。

最新版本(1.7.10,2012年4月)现在包含对UTF-8的支持,以及包含在GitExtension 中。
不要忘记设置您的 autocrlf 到false



如果你真的缺少所有其他unix命令,而不是msysgit包,只需下载 GoW(Windows上的Gnu),恰当地命名为Cygwin的轻量级替代品。

我的意思是: 130 unix命令 ...



Cygwin应该是某些情况下的备份解决方案,例如 Git存储库的传输速度,如下所述 incrementor 他的回答中。






2012年6月:如果您要与 GitHub 进行互动,现在您可以使用 http://windows.github.com (另请参阅设计GitHub for Windows )。

它不仅将为您配置ssh密钥(并将生成的公钥添加到您的GitHub配置文件),但是






原始答案(2009年4月)

p>

我对MsysGit的最新版本没有问题:

我使用选项2 ,这意味着我只将git\bin目录添加到PATH环境变量,但没有覆盖一些内置的Windows工具。



我设法定义外部工具,如记事本++ WinMerge(或DiffMerge)



例如 svn2git 的脚本,因为从MsysGit1.6.2 +,它包括' git svn '命令。



最后我期待MsysGit1 .6.2.3为其将包括finally' git filter-branch '命令! (filter-branch的慢版本,但仍然)。



对于Unix命令,我更喜欢安装 GnuWin32 coreutils包,并仅在需要时使用它们。



所有的一切,我不使用Cygwin层,并设法在其基于Windows的版本MsysGit运行Git非常好。


I plan to migrate my projects over to git, and I'm currently wondering which is the best and / or most stable option under windows.

From what I gather I basically have 2.5 options:

  1. MSYSgit
  2. git under Cygwin
  3. (aka 2.5) MSYSgit from a Cygwin prompt (given that Cygwin git is already installed).

Note: IMO Cygwin in itself is a big plus as you can have access to pretty much all the *nix command line tools, as where with MSYSgit bash, you only have access to a rather small subset of these tools.

Given that, what option would you suggest?

解决方案

Edit (2 more years later: October 2014)

Johannes Schindelin just explained (Oct. 2014) that msysgit is phased out:

we now have a light-weight Git for Windows SDK – which is essentially a standard MinGW/MSys system managed through the package manager mingw-get.

We decided to just phase out the name "msysGit" (as well as the GitHub org of the same name) and work on Git for Windows (with the corresponding GitHub org), and using the name "Git for Windows" for the installer aimed at "end-users" and "Git for Windows SDK" for the development environment targeting Git for Windows developers).


Edit (3 years later: April 2012)

MsysGit (now on GitHub) is the way to go if you want a light-weight fast start in Git world: unzip the archive, launch git-cmd.bat or git-bash.bat and you are done.
Its latest release (1.7.10, April 2012) now includes support for UTF-8, also included in GitExtension. Don't forget to set your autocrlf to false though.

If you are really missing all the other unix commands not packages with msysgit, simply download a release of GoW (Gnu on Windows), aptly named "The lightweight alternative to Cygwin".
I mean: 130 unix commands...

Cygwin should be a backup solution only for certain cases, like the transfer speed of large Git repositories, as mentioned below by incrementor in his answer.


June 2012: if you want to interact with GitHub, you now have http://windows.github.com (see also "Designing GitHub for Windows").
It not only will configure the ssh keys for you (and add the generated public key to your GitHub profile), but it will also install, for all git operations, a... MsysGit.


Original answer (April 2009)

I have no problem with the latest version of MsysGit:
I use the option 2, which means I only add the git\bin directory to the PATH environment variable, but without overriding some built-in windows tools.

I managed to defined external tools like Notepad++ and WinMerge (or DiffMerge)

I did run successfully scripts like svn2git because, from MsysGit1.6.2+, it does include the 'git svn' command.

And finally I look forward to MsysGit1.6.2.3 for it will include finally 'git filter-branch' command! (a slow version of filter-branch, but still).

For the Unix command, I prefer to install a GnuWin32 coreutils package, and use them only when I need them.

So all in all, I do not use the Cygwin layer, and managed to run Git very well in its Windows-based release MsysGit.

这篇关于Windows下的Git:MSYS或Cygwin?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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