Have you ever used git and supplied a username and email as your author? That's PII in a distributed service that cannot be revoked.
Once you've got that sorted and you can change/remove identity information, the likes of GitHub have no issue so long as they have GDPR-compliant contracts with any business partners who can access git repos. Obviously, anyone using GitHub who decides to store all identity data forever is, generally speaking, not GitHub's problem, same as someone who noted down the names of all their friends on Facebook isn't Facebook's problem.
Misuse of git isn't a problem inherent to git.