Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git under windows: MSYS or Cygwin?

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?

like image 623
joce Avatar asked Apr 23 '09 23:04

joce


People also ask

Does Git for Windows use Cygwin?

Coincidentally enough, Git comes with the Cygwin net release. You can use the gitweb interface.

Does Git bash use Cygwin?

Choosing a UNIX emulator The difference between Cygwin and git-bash is that Cygwin is bigger, more flexible, and more extendable, and more all-encompasing. git-bash is smaller, easier to install, but the native git-bash is not extendable, and so separate installations are required for extended capability.

What is Msys Git?

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. msysGit is not Git for Windows; that is an installer which installs Git -- and only Git.

Which of the following executables is used to install Git on Windows Cygwin or msysGit?

1 - Yes. msysgit is an implementation of git that uses MSYS, and has higher performance than Cygwin git. msysgit has command line git.exe executables as well.


2 Answers

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.

like image 188
VonC Avatar answered Oct 08 '22 18:10

VonC


Yes. Old question. New answer:

We have been using MSYSgit for about 2 years now in a large deployment. The speed of transfers from a local git repository server have been limited to less than 5 MiB/s. Earlier investigation into the issue indicated that the problem was with MSYS devs being on Windows XP and Windows 7 security limiting connections from command prompt/bash shell. This does not appear to be, in fact, the problem.

I discovered Darrell Mozingo's blog posting and tested a clone of a large (many GiB) repo using only a Cygwin install. Transfer speeds were in the 30 MiB/s range. The problem is that MSYSgit uses an antique OpenSSH binary from 2007.

To this end, until that gets fixed, I am now recommending a shift to Cygwin (even though the version of git is a bit behind). I also found Cygwin to be more stable and less likely for perl to run out of memory.

like image 24
incrementor Avatar answered Oct 08 '22 18:10

incrementor