>Gitea is a community managed lightweight code hosting solution written in Go. It is published under the MIT license.
If you want to collaborate on a git repo, a self-hosted gitea instance is a pretty easy and painless solution.
The major public clouds offer private git hosting as well.
If you want to eschew git servers altogether, you can send and receive git patches via email: https://git-scm.com/docs/git-send-email