Gitea and forks exist, Fossil is also a plausible alternative although it seems not everyone likes its workflow. Maybe discovery could be handled simillar to Mastodon through ActivityPub, I think it wouldn't even be too hard to integrate into existing Git code forges.