As others have pointed out one possible option is git-ssb:
https://social.coop/@bhaugen/100140415
For those #IPFS-inclined, there's some projects which help with rehosting and managing git repos over the p2p network
1 https://github.com/larsks/git-remote-ipfs
2 https://github.com/larsks/git-remote-ipfs
3 https://medium.com/@alexberegszaszi/mango-git-completely-decentralised-7aef8bcbcfe6
We're almost there