Right now whoever cares has a clone of the repo locally and can just push elsewhere. It is decentralized.
Though, is there anything like a peer to peer distributed floating global repository? The repo is in the peer to peer network and git uses that as a remote? Could something like that work?
But there seems to be two main candidates:
https://radicle.network/ which is a true federated git forge, where issues and PRs live inside the repo
https://tangled.org/ which is basically GitHub but built on top of ATProto (so the social features, global repo search and so on works) , so it's interoperable with any ATProto thing, and git hosting is delegated to a "knot" where you can use your own or a public one.
I'll admit I don't know much about radicle but I've heard about it a lot.
Though I personally prefer tangled because they managed to get back the GitHub social features but in a decentralized and interoperable way