This is doable without to much work. All someone has to do in order to make this happen is adapt the git-ssb implementation to nostr. The one shift is that git-ssb puts the patches and repos in to a blob because ssb has a signed message size limit of 8k on messages. With nostr you could skip that step.

GitHub
GitHub - hackergrrl/git-ssb-intro: :wrench: Learn git-ssb: a decentralized GitHub alternative.
:wrench: Learn git-ssb: a decentralized GitHub alternative. - hackergrrl/git-ssb-intro