Most developers do not think about where their Git repository lives until something goes wrong. An account gets suspended. A DMCA notice takes down a project overnight. A platform changes its terms of service to train AI models on your code. Then it becomes urgent.
This post is specifically about code repository hosting, where your Git history, branches, and collaboration happen. Not CI/CD, deployment, or compute hosting. The question is narrow: where should your source code live, and what are the tradeoffs?
The incumbents
GitHub is the default. Most open-source projects live there. Most hiring managers look there. Most tooling integrates with it first. If you have no strong reason to be elsewhere, inertia keeps you on GitHub. But there are reasons to think carefully about this default:
- DMCA compliance. GitHub is a US-based entity and complies aggressively with DMCA takedown requests. The process is automated and weighted toward the claimant. In March 2026, one filing against a single repository took down an entire fork network of 8,100 repositories.
- AI training. In April 2026, GitHub updated its policy to use interaction data from Copilot Free, Pro, and Pro+ users to train its AI models by default. Individual developers are opted in unless they manually disable the setting. The opt-out model has a structural flaw: there is always a gap between when a new policy takes effect and when you discover it and change your settings. During that window, your code has already been ingested.
- Account suspension. GitHub can suspend accounts for ToS violations, and the appeals process is opaque. For a solo developer, this can mean losing years of work history in a single action.
- Microsoft ownership. A matter of individual judgment, but the structural fact remains: a single corporation controls the platform where most of the world's open-source code lives.
None of these are reasons to leave GitHub in a panic. They are reasons to understand what you are trading for the convenience.
GitLab.com is the most feature-complete alternative. It has publicly stated that it does not train AI models on customer code at any tier. The self-managed edition can be installed on your own infrastructure. The interface is heavier than GitHub's.
Bitbucket, owned by Atlassian, is the natural choice if your team already uses the Atlassian stack. As a standalone platform it has few distinguishing features.
The alternatives
Codeberg is a non-profit code hosting platform based in Germany, run by the Codeberg e.V. association, powered by Forgejo. Non-profit governance, GDPR jurisdiction, and no AI training. The tradeoff is scale: it runs on non-profit infrastructure and can be slower during peak traffic.
SourceHut (sr.ht) is the most opinionated platform, built around minimalism, privacy, and email-based workflows.
Choosing a repository host is like choosing a neighborhood: the default is safe and convenient, but you should know what you are trading for the convenience, and the tradeoffs change as the world changes.
Opting out after the fact does not un-train a model. The damage, if you consider it damage, is done before you had a chance to make a choice.