Checkout "Interplanetary Git Service" - IGiS, it's Git on IPFS. https://igis.io/#/ and https://github.com/ipfs-shipyard/IGiS for the code.
Another thing that might be possible would be to have Gitea support saving to IPFS. I understand Gitea to be using https://github.com/go-xorm/xorm so if we can have some IPLD/IPFS support in xorm, it could probably work with Gitea as a additional storage backend. But the UI would have to accommodate for some sort of federation for it to work properly.