Git is decentralised. You can host it *literally anywhere*. That's it's nature. What you're looking for is a decentralised git forge, adding social features on top of git
yes.. and we can have that with nostr. I aim to make that possible. this is my first step: https://github.com/gugabfigueiredo/git-remote-nostr
While this is all true, what most people are looking for is not really just storing/sharing code on an easy to find location. It's usually also involves pipelines, issue trackers, collaboration in other forms. I don't know if this is what you mean by "social features" but it is great complimentary tooling that supplements git but really does not even need git. If it is really just about "having it available for others to clone" it would be fine to just use some cheap https setup or you could even use ssh if you only care about a select group of people.
Its not just about git. Github has a project wiki, pr system, ticketing, fork and release tracking and many other features. These parts of github are highly centralized. To be cut off from it is to lose connection to your devs, your users and all configuration and project management.