Since Git is licensed under GPLv2, and, to my understanding, GitHub interacts with Git, shouldn't the whole GitHub codebase be open-sourced in a GPL-compatible license?
3 reasons why:
According to the terms of the GPL, people accessing GitHub via the web is not considered releasing (or propagating in GPLv3 terms), and so GitHub is not required to share their source code. If GitHub was to sell a version of their service (which they might do, I haven't bothered to look) where they send you their software and you run an instance of GitHub internally on your own network, then they might be required to also ship the source code, unless:
GitHub may very well be accessing the Git client through command-line invocations, in which case that is considered communicating "at arms-length", and thus does not make GitHub a derivative work and therefore not subject to the requirements of the GPL.
Additionally, GitHub may very well not even be using the Git software and has written their own core "git implementation" and has re-implemented its interfaces to maintain compatibility, in which case again the GPL's requirements would not come into play.
In addition to the other answers, I would add that the FSF's views on when two cooperating programs form a single work are quite vague:
Furthermore, these views have never been tested in court, except in Germany:
It's an ongoing case but so far the judge has opined that one of the key considerations listed by the FSF for determining whether two programs form a single work, namely, sharing the same address space, has no relevance to (German) copyright law. It should be noted that the FSF is not involved in the lawsuit but the litigating party has been advocating for the FSF view on aggregation/derivation.
So, for persons writing the next Github, I would say, don't assume you are on the wrong side of the law when the FSF says you are (and vice versa).