msysgit 和 Cygwin + git 的区别? [英] Difference between msysgit and Cygwin + git?

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

问题描述

msysgit 和 Cygwin + git 有什么区别?

现在我使用的是 msysgit,但我不喜欢 Git Bash(你不能调整大小或复制/粘贴)所以我正在考虑切换到 Cygwin,因为那样我可以使用 :

<块引用>

MSysGit"中的MSys"是什么东西?

MSys 是一个 Windows 环境,提供了一个 Unix 类型的 shell 和一个 Perl 解释器.因为 Git 的很多部分仍然不是用 C 编写的内置程序,而是用 shell 和 Perl 脚本,所以 Windows 版 Git 需要这样的环境.

因此,我们为 Windows 提供 Git,其中包含一个非常小的 MSys 版本.

构建 Git 还需要 MSys,因为我们重用上游 Git 使用的相同 Unix 类型设置.我们提供了一个更完整的 MSys 环境,包括 GCC,作为构建环境(因此昵称为msysGit").

我们将 Git 编译为一个纯粹的 MinGW 程序,即一个没有任何链接依赖的程序,但是标准 Windows 库.
因此,除非您需要使用仍然仅作为 shell 或 Perl 脚本实现的 Git 的任何部分,否则您可以运行普通的 git.exe.

<小时>

原答案:2010 年 6 月

a/您可以在 Git bash 中调整大小和复制粘贴,就像在任何其他 Windows Shell 中一样.

b/您可能使用的是Windows 版 Git",而不是 msysgit.来自 维基:

<块引用>
  • msysGit 是为 Windows 编译 Git 的开发环境.它是完整的,从某种意义上说,您只需要安装 msysGit,然后就可以构建 Git.无需安装任何第 3 方软件.
  • Windows 版 Git 是一个安装程序,它安装 Git -- 并且只安装 Git.

很容易看出区别:

  • Git 的安装程序有前缀 Git-,
  • msysGit 安装程序具有前缀 msysGit-.

另一个说明是 msysGit 安装程序有两种版本:fullinstall 和 netinstall.
此外,默认情况下,msysGit 不会安装到 C:Program Files.
但是 msysGit 带有 gcc,即 GNU C 编译器.

c/来自 MSysGitHerald10:

<块引用>

记住:

  • MinGW 确实是 Microsoft 运行时之上的一个非常薄的编译时层;因此,MinGW 程序是真正的 Windows 程序,没有 Unix 风格的路径概念或 POSIX 细节,例如 fork() 调用.
  • 相比之下,MSys 是 Cygwin 的精简版(旧版本),其唯一目的是提供足够的 POSIX 层来运行 bash.

这就是并不总是受欢迎:

<块引用>

在 Windows 上工作时,我不喜欢 msysGit,顾名思义,它依赖于 MSYS 和来自 Unix 世界的工具.我认为 Git 发行版中的所有程序都应该成为针对特定平台编译的二进制文件,而不是依赖于 shell 解释器或第三方语言,如 Tcl/Tk.

尽管如此,它还是比第一个 2007 年在 Cygwin 上安装的 Git.

What is the difference between msysgit and Cygwin + git?

Now I'm using msysgit, but I don't like the Git Bash (you can't resize or copy/paste) so I'm thinking think about switching to Cygwin, because then I could use mintty.

解决方案

Edit 2018:

Since my 2010-2012-2014 answer, in 2015 Git for Windows uses msys2, as I detail here.

See more in "How are msys, msys2, and msysgit related to each other?".


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),
  • using the name "Git for Windows" for the installer aimed at "end-users" and
  • using the name "Git for Windows SDK" for the development environment targeting Git for Windows developers).


Update 2 years later: July 2012

Msysgit is here to stay, and unless you need to add a few hundreds of MB for cygwin, you really don't need Cygwin to just use Git on Windows.
And if you want to access GitHub, you get one package ("Git for Windows" + ssh keys registered for you on your GitHub account + a nice GUI) with GitHub for windows.

Both Git and msysgit are on GitHub.
The msysgit.github.com page clearly illustrates the difference between:

<---------->
"Git for Windows": Pure users of Git | "MsysGit": for Testers, developers, custom installer maintainers

See also the msysgit FAQ:

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.


Original answer: June 2010

a/ You can resize and copy-paste in Git bash, like in any other Windows Shell.

b/ You are probably using "Git for windows", and not msysgit. From the wiki:

  • msysGit is the development environment to compile Git for Windows. It is complete, in the sense that you just need to install msysGit, and then you can build Git. Without installing any 3rd-party software.
  • Git for Windows is an installer which installs Git -- and only Git.

It is easy to see the difference:

  • the installers for Git have the prefix Git-,
  • the msysGit installers have the prefix msysGit-.

Another telltale is that the msysGit installers come in two flavors: fullinstall and netinstall.
Further, msysGit does not install to C:Program Files by default.
But msysGit comes with gcc, the GNU C Compiler.

c/ From MSysGitHerald10:

Remember:

  • MinGW is really a very thin compile-time layer over the Microsoft Runtime; MinGW programs are therefore real Windows programs, with no concept of Unix-style paths or POSIX niceties such as a fork() call.
  • MSys, in contrast, is a slimmed-down version of Cygwin (an old version at that), whose only purpose is to provide enough of a POSIX layer to run a bash.

And that is not always welcomed:

When working on Windows, I dislike that msysGit, as the name suggests, depends on MSYS and on tools from the Unix world. I believe all programs in the Git distribution should become binaries compiled for a specific platform, and not rely on shell interpreters or third-party languages like Tcl/Tk.

Even though, it is far better than the first Git on Cygwin installations from 2007.

这篇关于msysgit 和 Cygwin + git 的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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