In addition to tech stack, another important thing to remember with Github (and any other Git hosting service like GitLab) is that they don't necessarily have to store each individual file for each commit.
Linus Torvald's amazing creation of Git handles the storage of changes remarkably well, which contributes to the storage of Github's files.