I remember reading an article about this. There was some performance problem with Git, which GitHub fixed internally, then contributed the fix back to Git itself. From this I guess GitHub uses Git, or maybe libgit for their software. GitLab has an open source version, so you can take a look and see for yourself. Also, this might be a good question to ask separately.