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.
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 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.
Git-1.7.0.2-preview20100309.exe
") and msysGit itself (the installer for the development environment of Git for Windows: msysGit-netinstall-1.7.1-preview20100612.exe
). –
Athelstan C:\WINDOWS\system32\cmd.exe /c ""C:\Program Files\Git\bin\sh.exe" --login -i"
. What your Git bash shortcut refers to? When I open this windows (which has a vertical Git word as a logo), I can right-click on the title bar (which has MINGW32:~/.
on it) and see the usual contextual menu (Restore/Move/Size/Minimize/Maximize/Close/Edit/Default/Properties). Do you see the same contextual menu? –
Athelstan 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
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:
-noacl
option by default. Doing that in cygwin as well seems to avoid those issues.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.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
...).
MSysGit ships with a very old version of SSH. Throughput on my system was around 10 mbit. If you don't care about clone speeds, then this does not affect you. The fix is to either run Cygwin Git or replace the SSH installed in MSysGit.
The bash implementation in msysgit is old. However, i use vim when editing and that works great. As for cutting and pasting, I often resort to SHIFT+ALT+[space], E, M or whatever the keys are to get to mark text I want. Not ideal, but does the job well enough as I don't cut and paste too much.
I've now started running Ubuntu on the same machine through VirtualBox. With seamless mode and shared folders, I can take advantage of an up to date bash and fast Git.
I do not use any gui tools for Git except gitk (for gitk --all) to visualize history if I need to.
I've tried cygwin and didn't like it. The virtual box solution is much better if msysgit is not enough for you.
The current version of git on cygwin is 1.7.5.1, which is very, very current (May, 2011).
I see no reason (so far) to use anything else, though I am considering giving msysgit (aka "Git for Windows") a try (currently version 1.7.4).
Msysgit has received a number of patches to deal with Windows specific issues such as filesystem case insensitivity, file locking etc. It's probably a bad idea to use the cygwin version. If you have cygwin on your system I'd advise not installing git at all, and preferably not sharing msysgit or cygwin environments from the same PATH.
cygwin sees your local files in windows format, whereas git-bash sees them in unix format. If you check out files in git-bash then run git status on a cygwin shell, git thinks you have modified every line in the repo, if you run git status in the git-bash shell, then only files you have touched are modified.
text
for certain paths in the /etc/fstab
file for auto line ending conversion). How line endings are preserved is also dependent on your editors; modern ones are configurable in this respect, too, in addition to cygwin. I'm using cygwin and windows git in parallel and it works fine for now. –
Lest This is an answer from 2018...
Git for Windows is based on MSYS2.
MSYS2 was started with the idea to restart the MSys project, frequently updating with Cygwin and just keeping the spirit of MSys to provide a very stripped-down POSIX layer, essentially a bare-minimum version of Cygwin. MSYS2 also sports a package manager (pacman) and keeps those packages up-to-date very well.
..
MSYS2's runtime is a stripped-down, slightly modified Cygwin runtime running on top of the Windows kernel, while Linux' runtime is the Linux kernel, running as a separate OS altogether.
https://github.com/git-for-windows/git/wiki
Cygwin provides a runtime library called cygwin1.dll that provides the POSIX compatibility layer where necessary. The MSYS2 variant of this library is called msys-2.0.dll and includes the following changes to support using native Windows programs: How does MSYS2 differ from Cygwin
If you plan on doing more than just git commands in git bash, I'd suggest Cygwin with git.
If you plan on not doing anything but git commands in git bash, then a) sure, use git bash, but b) why not just use Git GUI?
Git bash is not that bad, BUT, there's times when I need to use Cygwin for things that simply don't work in git bash. (Perl CPAN, for example. XSL tools, for another.) Which seems really silly to have to use two totally different bash command line implementations.
© 2022 - 2024 — McMap. All rights reserved.