windowsgitpackagepackage-managers

How can I minimise what is installed by Git for Windows?


The git for Windows client appears to install an entire mingw distribution onto my machine consuming over 500MB of space.

This is nearly twice as large as the installation of Gimp for Windows!

I already have cygwin, vim and all of the other utilities I need to do my job and so have no need whatsoever for yet another copy of perl, vim, etc. I just need a git client for Windows.

How can I minimise what is being installed so that I just get a git client I can use?


Solution

  • Two things are in play here:

    So, we are basically left with two bundled pieces of software which are not strictly needed: Vim and Mintty. The opinion of the folks working on GfW is that they are expected to be available by those who prefer to work with GfW from the Git Bash window. Simply put, they are there for those who came from Unix land or switch systems back and forth between Windows and Unix-like ones (Mac OS X included).

    So… If you think about this a bit more, when, say, on a typical GNU/Linux-based OS you do somehing like

    apt install git git-gui gitk git-svn
    

    you just don't give a heck about the dependencies because

    This makes the installation of Git to appear as if it has almost zero dependencies which is wrong.

    Windows, on the other hand,

    As you can supposedly see now, the GfW developers had no other sensible way to go around implementing this product short of bundling all that stuff. After all, a typical Joe Random Developer expects to download the installer, click through it and get a fully working product as the result.

    The situation is going to improve on this front a bit: since the start of the 2.x branch, GfW strives to piggyback on the Msys2 ecosystem as much as possible, and this includes its package management facility (based on the Windows port of pacman IIRC). I'm not sure whether it works now but the goal was to eventually make GfW installable piecemeal by having it available as a set of Msys2 packages. If you want a status update on this, feel free to ask on the GfW mailing list.

    To recap, if not already there, there will be two ways to get GfW on your system: via the (full) installer and via the Msys2 ecosystem and its own package manager. The latter facility will enable you to install only a minimum amount of stuff (in exchange to some overhead incurred by the package manager's bookkeeping).


    1 That won't work if you have installed GfW on a filesystem which does not support hardlinks—such as FAT32.