gpt4 book ai didi

windows下git : MSYS or Cygwin?

转载 作者:IT王子 更新时间:2023-10-29 00:32:22 28 4
gpt4 key购买 nike

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

据我所知,我基本上有 2.5 个选项:

  1. MSYSgit
  2. git 在 Cygwin
  3. (又名 2.5)来自 Cygwin 提示符的 MSYSgit(前提是 Cygwin git 已经安装)。

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

鉴于此,您会建议哪种选择?

最佳答案

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

Johannes Schindelin just explained (2014 年 10 月)msysgit 被淘汰:

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).


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

MsysGit(现为 on GitHub)是您在 Git 世界中轻量级快速启动的必经之路:解压缩存档,启动 git-cmd.batgit-bash.bat你就完成了。
它的latest release (1.7.10, April 2012)现在包括 support for UTF-8 , 还有 included in GitExtension .不要忘记设置您的 autocrlf to false虽然。

如果您真的缺少所有其他 unix 命令而不是 msysgit 的软件包,只需下载 GoW (Gnu on Windows) 的版本即可。 ,恰如其分地命名为“Cygwin 的轻量级替代品”。
我的意思是:130 unix command小...

Cygwin 应该是特定情况下的备份解决方案,例如大型 Git 存储库的传输速度,如下所述 incrementorhis answer .


2012 年 6 月:如果您想与 GitHub 交互,您现在有 http://windows.github.com (另见“Designing GitHub for Windows”)。
它不仅会为您配置 ssh key (并将生成的公钥添加到您的 GitHub 配置文件),还会为所有 git 操作安装一个... MsysGit。


原始答案(2009 年 4 月)

我用最新版的MsysGit没有问题:
我用 option 2 ,这意味着我只将 git\bin 目录添加到 PATH 环境变量,但没有覆盖一些内置的 Windows 工具。

我设法定义了外部工具,例如 Notepad++WinMerge (or DiffMerge)

我确实成功运行了类似 svn2git 的脚本因为,从 MsysGit1.6.2+ 开始,它确实包含 'git svn' 命令。

最后我期待 MsysGit1.6.2.3 的发布 will include finally 'git filter-branch' command ! (过滤器分支的慢版本,但仍然)。

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

总而言之,我没有使用 Cygwin 层,并设法在其基于 Windows 的版本 MsysGit 中很好地运行 Git。

关于windows下git : MSYS or Cygwin?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/783906/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com