As I understand, there are different safe harbors and each applies at the "service" level. It's "online service providers" that have safe harbor status.
If you lose safe harbor status you become liable for infringing content on that service.
Infringement still has to happen and you'd still have to be taken to court and lose, but it's now "as if" you yourself uploaded everything.
So in this instance GitHub would be fine, but if they didn't take down the content then they themselves would become liable for any fringing content on their platform.
Or rather Microsoft would become liable, I suppose.
IANAL. That's just my rough understanding.
Fenwick and West has a lovely 36-page FAQ: https://assets.fenwick.com/legacy/FenwickDocuments/DMCA-QA.p...