Compare GitLab, Gitea, Forgejo, Codeberg and SourceHut. Learn what a Git mirror moves, what it leaves behind and how to plan a repository migration.
•4 min read•Code Editors, IDEs & Playgrounds
Verdict:Use GitLab when you want hosted Git with integrated CI and can work within its hosted Free limits. Evaluate Gitea or Forgejo when control of the server justifies operating backups, updates and runners. Codeberg fits eligible Free Software projects. A Git mirror transfers repository history, branches and tags; issues, review discussions, CI credentials and access rules require a separate migration plan.
| Tool | Price | Platforms | Best for | Tested |
|---|---|---|---|---|
| GitLab | Hosted Free: five users per top-level group; 400 compute minutes/month | — | Hosted Git and CI in one service | Docs only |
| Gitea | MIT-licensed self-hosted software; infrastructure extra | — | A forge on your own infrastructure | Docs only |
| Forgejo | Free self-hosted forge; infrastructure extra | — | A community-led self-hosting option | Docs only |
| Codeberg | Community-hosted Free Software projects; check eligibility | — | Eligible open-source projects | Docs only |
| SourceHut | Subscription tiers $4, $8 or $12/month; alpha service rules vary | — | Teams willing to adopt a different contribution workflow | Docs only |
Independent comparison. Paid placements are labelled separately; editorial links earn no affiliate commissions. Learn more.
The right GitHub alternative depends on what you are replacing: a remote Git repository, a collaboration platform, a CI service, or the organisation that operates the hosting. Those are different decisions. Moving commits is relatively contained; moving reviews, build credentials and contributor habits is a project of its own.
For hosted Git with integrated CI, start by evaluating GitLab. For a forge on infrastructure you control, compare Gitea and Forgejo. For an eligible Free Software project, consider Codeberg. SourceHut belongs on the list if its contribution workflow fits your maintainers. These are recommendations based on documented capabilities, not results from running the servers.
| Option | Who operates the forge? | Documented starting point | Main decision |
|---|---|---|---|
| GitLab.com | GitLab | Free: five users per top-level group, 400 compute minutes/month, 10 GiB storage | Check group size and runner requirements |
| Gitea | You, for the self-hosted product | MIT-licensed software with Git, reviews, issues, packages and CI features | Who owns updates and recovery? |
| Forgejo | You | A self-hosted Free Software forge | Check integrations and your preferred project governance |
| Codeberg | A nonprofit community service | Forgejo-powered hosting focused on Free Software | Check project eligibility and service rules |
| SourceHut | SourceHut, for the hosted service | Subscription tiers of $4, $8 or $12/month with the same features | Check workflow fit and alpha payment rules |
Sources: GitLab, Gitea, Forgejo, Codeberg and SourceHut, checked October 26, 2026. GitLab.com's hosted Free limits are not a description of every self-managed GitLab installation.
SourceHut's pricing needs a careful reading: during its public alpha, payment is optional for most services but required for builds and chat. People contributing to a hosted project are not all required to buy subscriptions. Do not multiply a subscription figure by every occasional contributor without checking the service's actual rules.
For a small commercial team, count the people in your top-level GitLab group before relying on its hosted Free plan. Then inventory build minutes, artifact storage and any deployment integrations. A plan can be free for repository hosting and still fail your CI budget.
Gitea and Forgejo make the operating boundary explicit: you choose the machine and storage, and you own recovery when they fail. That suits a team with an operator and a reason to control hosting. It is less attractive when nobody is responsible for restoring a deleted repository, applying updates or rotating runner credentials. Free software does not remove those jobs.
Codeberg is a community service with a Free Software mission. It should not be presented as unrestricted, no-cost storage for proprietary company repositories. Read the service's current terms for your project before treating it as a destination.
If your reason for leaving GitHub is an AI or data-use policy, read each destination's current terms separately. A license on forge software does not establish how a hosted provider uses data, and moving to another brand does not itself establish a different policy. This article makes no provider-specific AI training guarantee.
For a closer comparison of the integrated platform, read GitLab alternatives. The free Git client guide addresses desktop clients rather than repository hosting, so changing clients should be evaluated separately from moving a forge.
GitHub's repository duplication guide describes a bare clone followed by a mirror push. This preserves repository refs, including branches and tags. Repositories using Git LFS require separate LFS fetch and push steps.
| Migration item | Treat it as |
|---|---|
| Commits, branches and tags | Git repository data |
| LFS objects | A separate transfer and verification task |
| Issues, pull-request conversations and review decisions | Platform data requiring an importer or archive |
| Actions workflows and runner configuration | CI code requiring destination-specific validation |
| Secrets, deploy keys and registry credentials | Credentials to recreate and rotate deliberately |
| Branch protection, team permissions and webhooks | Policies to rebuild and test |
A repository that clones successfully is only the first acceptance check. A release engineer must still be able to publish, a contributor must still be able to open a review, and a restricted account must still be denied access.
Start with a low-risk repository that resembles your real workflow. Record the source's branches, tags, LFS use, branch rules, integrations and latest successful release. Create an empty destination repository before using a mirror push: mirror operations can overwrite destination refs, so do not aim them at a repository containing work you need.
Avoid two writable copies without a reconciliation plan. They can diverge while both appear healthy. Preserve the original repository until the destination's recovery, permissions and release path have been checked.
Keep GitHub if external contributions, Actions integrations and release tooling are the work you would spend weeks rebuilding without a clear gain. Choose GitHub alternatives when the hosting requirement, cost model or operating control is concrete enough to justify that work. A good migration ends with a functioning contribution and release process, not just a new remote URL.
Official documentation review on October 26, 2026. No server deployment, CI compatibility benchmark or migration test was performed. Hosted and self-managed offers are compared separately.
No. It copies Git refs to the destination. Issues, review discussions, permissions, workflow credentials and other platform data need a compatible importer or a separate archive.
The software may be free to use, but the server, storage, backups, updates, monitoring and CI runners still require resources and operator time.
Codeberg focuses on Free Software and community projects. Review its current terms and eligibility before moving proprietary or private company work; do not assume it is unrestricted free corporate hosting.
Kevin Fan is a SaaS founder. He runs Free Instead Of, which tracks free and open-source alternatives to paid software and checks prices and plan limits against vendor documentation.
Official documentation review on October 26, 2026. No server deployment, CI compatibility benchmark or migration test was performed. Hosted and self-managed offers are compared separately.