Skip to content
Johannes Schindelin edited this page Feb 12, 2018 · 9 revisions

Introduction

The Git for Windows wiki. It looks more technical than our home page because it is the place where you can contribute to the documentation about Git for Windows.

About

Git for Windows is very different from Git for almost everything else in one important respect: Windows does not provide the POSIX infrastructure Git expects.

Therefore, it always had to ship with much more than any other Git distribution: provide a bash, a perl, many POSIX tools such as sed, awk, tr, etc.

Git for Windows 1.x did that by starting off from an MSys installation and just packaging all the required files as-are. MSys did not sport any package manager at the time, so all of the updates were quite manual, and some of the components we shipped were not even part of MSys -- such as msmtp or WhoUses -- so we had to compile them from scratch, and maintain those components ourselves.

This became really too tedious, so much so that there was not enough time to provide updated Git for Windows installers regularly.

At some stage, it became obvious that there needs to be a better solution. @sschuberth had already started a separate project to leverage the package manager that MSys had introduced at that stage, mingw-get. However, it turned out that the packages were not maintained all that well, and besides, MSys' runtime had not been kept up-to-date with Cygwin, and was falling behind in terms of features and support.

In a two-hour Skype session about the course of Git for Windows @dscho, @t-b and @sschuberth decided to give MSYS2 a whirl. 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. Another bonus: MSYS2 is available for 64-bit in addition to 32-bit, while MSys was stuck with 32-bit.

Thanks to sponsoring of GitHub, @dscho could afford to spend the time to investigate the possibilities with MSYS2. It turned out that MSYS2 already provided most of the parts needed, and would make maintenance much, much easier. @dscho (and others too) really spent an insane amount of time (thanks GitHub!) to get everything up to speed, even fixing a couple of long-standing bugs in Git for Windows. It essentially came down to modifying the msys2-runtime to Git for Windows needs. The rest is basically upstream MSYS2 architecture.

And yes, the idea is still the same as the original one: Update the MSYS2 setup, together with a Git package built from Git for Windows' source code, then bundle the relevant files together with a couple of extra files into an installer. Then I sign it and upload it. And that is Git for Windows 2.x.

Now, keep in mind that MSYS2 and Linux (The original target for Git's distribution) are very different beasts. Their distributions might include packages that are built from the same source code (i.e. the binutils, gcc or bash package), but the runtime is very, very different: 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.

So if you are missing some packages - feel free to start making one. This is Open Source, however, so everybody interested and capable enough can contribute whatever they need to address their needs. And that includes you: you could imitate e.g. a simple PKGBUILD file to build a new package e.g. msmtp, the component that Git for Windows 1.x uses to support sendemail. Then open a Pull Request so that Git for Windows can ship it. Our documentation will be helpful in that endeavor: package-management, in particular package-management#rebuild-packages.

Start documenting

If you need inspiration what you could write about: document your common work flows. Write a tutorial how to start coding Git for Windows, how to run the test suite. Write a tutorial how to debug a failing test. Write about something you would have wished you had known about Git for Windows a long time ago.

You can’t perform that action at this time.