如何将 Cygwin 包添加到已安装的 git-scm?

How to add Cygwin package to installed git-scm?

我 git 在 Windows 7 机器上安装了 Cygwin(二手 git-scm)。如何将 Cygwin 包(如 openssh-server)添加到现有安装中?

我在任何地方都找不到说明,也找不到修改现有 Cygwin 安装的选项。

谢谢。

Git 来自 http://git-scm.com/(我推荐在 Windows 上使用的版本)不使用 Cygwin,所以没有这样的环境可以修改。

Windows 版本由 msysGit project, whose FAQ has this to say:

提供

What is this MSys thing in MSysGit

MSys is an environment for Windows offering a Unix-type shell and a Perl interpreter. Because many parts of Git are still not builtins programmed in C, but instead shell and Perl scripts, Git for Windows needs such an environment.

Therefore we ship Git for Windows with a very minimal version of MSys.

MSys is also required to build Git, as we re-use the same Unix-type setup upstream Git uses. We ship a more complete MSys environment, including GCC, as build environment (which is therefore nick-named ''msysGit'').

We compile Git as a pure MinGW program, though, i.e. a program without any link-dependencies on anything but standard Windows libraries. So unless you need to use any parts of Git that are still implemented only as shell or Perl scripts, you can get away with running plain git.exe.