Forgejo
Community-driven, self-hosted Git forge forked from Gitea and stewarded by Codeberg e.V. Lightweight and copyleft, built to be owned by the people who run it.
4 private alternatives, vetted against our public criteria.
GitHub is owned by Microsoft, which means the code you push lives on infrastructure you do not control. Your public repositories have been used to train Copilot under terms a company whose priorities are not your own gets to set, and the platform centralizes open source on one proprietary service. The forges below put both the storage and the rules that govern your code back in your hands, whether you self-host or trust a nonprofit.
Community-driven, self-hosted Git forge forked from Gitea and stewarded by Codeberg e.V. Lightweight and copyleft, built to be owned by the people who run it.
Free, nonprofit Git hosting for open-source projects, run on Forgejo with no ads and no tracking. Operated by Codeberg e.V. in Germany.
Full DevOps platform whose Community Edition is open source under the MIT license and self-hostable, with a hosted cloud option too. Based in the US.
Minimalist, fully open-source forge built around an email-driven workflow, with no required JavaScript. Available as paid hosting or self-hosted. Based in the US.
Why settings won’t fix GitHub. The problem with GitHub is not a checkbox you missed. It is owned by Microsoft, and no preference inside the product changes who controls the infrastructure your code sits on. No toggle pulls your public repositories out of the training data behind Copilot, and no setting moves your storage onto a server you own or hands you a say in how the platform is governed. You can tighten visibility and lock down permissions, but the structural facts hold. The servers and the terms both belong to Microsoft, and your source lives where it can be mined. Owning your code means hosting the forge yourself or handing it to an organization that exists to serve developers rather than to sell a model trained on them.
What actually matters in a Git host. Two questions sort the field. Where does the code live, and who controls the rules? A self-hosted forge like Forgejo puts your repositories on infrastructure you own, governed by a copyleft license that is hard for any company to capture. Codeberg runs that same forge as a nonprofit hosted service, so you get the independence without running a server, funded by its community rather than by mining your code. GitLab CE bundles a full DevOps platform you can self-host, open core with proprietary tiers above the free base. If you want the leanest option, SourceHut strips the forge down to a JavaScript-free interface and an email patch workflow. The license matters as much as the features here, because a permissive project can be folded into a paid product later while a copyleft one cannot. Each pick breaks the dependence on a single proprietary platform, which is the move that actually protects your work.
How to switch. Stand up your chosen forge first, either by deploying a container on a small server or by signing up with a hosted provider. Use the built-in importer to pull each repository across with its issues and history, then repoint your local clones at the new remote so your daily work follows. Move your CI next, since the pipeline format differs from GitHub Actions and is the piece most likely to need a rewrite. Keep a read-only mirror on GitHub for a while so existing links resolve while you tell collaborators the real home of the project. The point of moving is that nothing here is captive: a forge whose code you can run yourself can never lock you in the way a proprietary platform can. Browse the full lineup on our self-hosted Git hosting page, and if GitHub is only the first Microsoft service you are replacing, the de-Microsoft playbook covers the rest of the stack.