I agree, and have always tried to keep a local Clone of my most favored repositories.
A couple of years ago I tried git-ssb.
GIT in ipfs has too many limitations.
A quick search came up with https://radicle.xyz/ but I have no experience of it even though it sounds interesting. I do feel some tingeling shitcoin vibes, but I didn't see anything at the first glance.