Differences between MinGW from msysgit (aka Git on Windows) and MinGW from MinGW.org
Asked Answered
P

1

8

I have installed msysgit via the net installer. I ended up with almost 2 giga of material, where I have among the other things git sources and MinGW.

I have three questions

  • I already had MinGW from MinGW.org. Now I think I can remove the latter and stay with msysgit distribution. Anyway MinGW from MinGW.org comes with mingw-get, which can be used to manage MinGW packages. How can I identify packages that come with msysgit? or, put it differently, (considering the huge msysgit size) what packages remain out?

  • Given the overall size and since Git is built, what are the folders that can be safely removed without affecting normal Git usage? That is assuming I don't need to build Git again.

  • And finally Should this version be considered as portable? If not, what are installed registry keys or environment variables?

In essence I need help to decide whether use the small portable Git and set symbolic links to MinGW or use the huge all-in-one distro and trash the good old MinGW.org.

Pachston answered 5/6, 2014 at 12:58 Comment(0)
A
16

Well, there a few misconceptions at play here. Let's first get them out of the way:

  1. The Unix-like shell environment you are talking about is called MSYS. It was originally developed by MinGW.org as a fork of Cygwin. This was in turn forked to be improved slightly so that git could run with it, which became msysgit. Note that the git binaries are native Win32 programs, but the POSIX shell is needed for its operation.

  2. MinGW.org provides a commandline installer/package installation tool called mingw-get. It can be run from MSYS (and I believe plain cmd as well).

Now, to answer your question:

  • I would say msysgit provides the minimal amount of packages needed for a fully functional git. Lots of git runs through the shell, so therefore you need a lot of utilities. I'm not sure about this one though.

  • Why are you building git? That sounds like an ugly endeavour. I suggest looking below for a better way to use git and MinGW and a shell together.

  • MSYS is quite portable, though you may need to rerun the postinstallation script if you relocate. By default, msysgit puts its ssh keys in your windows user folder, not in the MSYS tree, so be sure not to lose those.

Finally, to avoid all these issues and help improve your setup by a significant factor (of some random setup quality quantity): use MSYS2. What is MSYS2? It's an up to date fork of current Cygwin, patched to act like MSYS (with the whole path translation stuff), integrated with a package manager that's actually useful, and MinGW-w64 toolchains. To sum it up: MSYS2 is better, better, and better than anything you have now. Note that you can install a ton of MinWG-w64 libraries without having to build them yourself. You can also install git, although the MSYS2 package does not

Antepast answered 5/6, 2014 at 13:9 Comment(4)
+1 for pacman included. Will I be able to run/install Git from inside MSYS2?Pachston
@Pachston Yes, just pacman -Syu; pacman -S git. There should be a package.Antepast
This was the most precise answer clarifying the connection between mingw, msys and cygwin I found so far. Thank you!Schistosomiasis
Does seem like the msys installed by git for windows lives in a different environment (specifically: It mounts / at a different place) than what msys2 provides. I find the fragmentation of unix/posix environments available on windows to be aggravating, but on the other hand, the fact that we have them at all is something worth celebrating...Grillparzer

© 2022 - 2024 — McMap. All rights reserved.