Difference between msysgit and Cygwin + git?
Solution 1:
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 toC:\Program Files
by default.
But msysGit comes withgcc
, 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.
Solution 2:
cygwin + git was the only way to make git work back in the day. Now that msysgit is around, I don't see any reason to use cygwin.
I agree git bash isn't that good.. so what I do is
- Put git in path and use window command prompt when I need command line
- Have tortoise git installed for when I want to have a GUI to my git
Solution 3:
This is an answer from 2017...
The fundamental technical difference is that all cygwin programs depend on the cygwin1.dll; but that's at the same time the least interesting one for the end user since it should be almost completely transparent. The main differences I found are not between the git versions as much as between the cygwin environment and msys/mingw environment. These are some differences I found:
- ACL handling. The way newer (post-2015) cygwins handles NTFS access control lists can be annoying to the point of dangerous. By default, the Windows drives are mounted with the acl option active. Cygwin tries to mimic POSIX permissions by re-shuffling and abusing ACL entries in a way which can make access through native windows programs impossible. Additionally it's possible that file access is slowed down dramatically in multi-user multi-domain (i.e., commercial or institutional) installations due to network access, because determining user and permissions potentially requires domain server queries for each file.
msys mounts with the-noacl
option by default. Doing that in cygwin as well seems to avoid those issues. - Speed. I'm currently working in a repository with 100k files (don't ask). A
git status
with all relevant disk contents in the cache takes 4.7 seconds with cygwin and 0.4 seconds with msys git. I'm not sure which part of the cygwin compatibility layer is slowing things down -- locks, forks, filesystem, IPC... they all are candidates. - Potentially filenames. I have not investigated the issue but I would suspect that a git (and the other tools) targeted for windows (like msys git) can handle windows file names better. Under cygwin one must diligently convert file names via
cygpath
between the two worlds. That will play an important role when scripts etc. interface with Windows programs.
Edit: it is perhaps not obvious that with some minor tweaks it is possible to share common settings for git (but not only for git) between cygwin and Msys2. If I remember correctly a good way is to set the HOME environment variable in the Windows system settings; then both Msys2 and cygwin will use that directory and hence the same dot-files, among them ~/.gitignore
. That makes changing between cygwin and Msys2 terminals pretty painless (think ~/.inputrc
, ~/.bashrc
, ~/.profile
...).