I have this question after what happened when Microsoft bought GitHub. But GitHub core is not git? I know that when you use a GPLv2 in your program you must have to give your program the same license. Can somebody clear this a little bit for me?
The GPL does not forbid you from using GPL'ed software. It requires something far more specific: if you modify the GPL'ed software and publish your modifications, then you can only publish under the terms of the GPL.
The question here is whether some use of Git would count as modification, and whether it counts as publishing. Different GPL versions introduce more precise terms for these concepts, so please read the actual license for details.
Regarding publishing or distributing GPL'ed software:
The GitHub web application is not published/distributed to users because they never receive a copy. So this wouldn't trigger any GPL requirements. The AGPL license closes this “loophole”.
GitHub Enterprise does however allow on-premise installation which would count as a publication as far as the GPL is concerned.
Regarding allowed use versus modifications/derived works:
- The legal situation here is unclear.
- Clearly, modifying the GPL'ed software counts as creating a derived work.
- The FSF (the authors of the GPL license but not the authors of Git) suggest that a derived work can be created also by linking with GPL'ed software so that the GPL'ed software is executed in the same process.
- In contrast, executing the GPL'ed software in a separate process (e.g. running Git as a shell command) would be “communication at arms length” that does not create a derived work.
- Other people argue that the FSF's interpretation is excessive, and that even use within the same process can be allowed.
So if GitHub would call the command-line Git for all its operations, their software wouldn't be a derived work and everything is fine.
But in reality, they use libgit2, an independent reimplementation of core Git operations. Libgit2 is licensed under the GPL with a linking exception that allows it to be linked without restrictions from proprietary software, under certain circumstances. This license is similar to the LGPL. Libgit2 is not a weird fork, it's actually the officially encouraged library for embedding Git into other software.
So the answer is: GitHub does not fall under the GPL because they don't use Git.