Dev tools
GitHub Alternatives: GitLab, Codeberg, Forgejo and More
The best GitHub alternatives compared: GitLab, Codeberg, Forgejo, Gitea, Bitbucket and more, with free-tier limits, self-hosting needs and how to migrate.
The best GitHub alternatives are GitLab for teams that want one platform for code, CI/CD and security, Codeberg for open-source projects that want a non-profit host, Forgejo or Gitea if you want to run your own Git server, and Bitbucket or Azure DevOps if your team already lives in Atlassian or Microsoft tools. All of them speak plain Git, so your history moves with you, and most can import issues and pull requests from GitHub.
This guide compares the main GitHub alternatives with their real free-tier limits, explains when each one fits, covers replacements for GitHub Actions and GitHub Pages, and walks through a migration that doesn't break your workflow.
GitHub Alternatives at a Glance
Limits below come from each provider's official pricing or documentation pages. Plans change, so check the page before you commit.
| Platform | Type | Free tier (main limits) | Paid entry point | Best for |
|---|---|---|---|---|
| GitHub (baseline) | Hosted, closed source | Unlimited public and private repos, 2,000 CI/CD minutes a month, 500 MB Packages | Team, $4 per user a month | The default; biggest community |
| GitLab.com | Hosted or self-managed, open core | 5 users per private top-level group, 400 compute minutes, 10 GiB storage | Premium, $29 per user a month | All-in-one DevSecOps |
| Codeberg | Hosted, non-profit | Free; for free/libre software, up to 100 MB of private content | Donations | Open-source projects |
| Forgejo | Self-hosted, GPL v3+ (from v9) | Free software, you run it | None (you pay for the server) | Self-hosting with community governance |
| Gitea | Self-hosted (MIT) or Gitea Cloud | Free self-hosted | Enterprise and Cloud plans | Lightweight self-hosting |
| Bitbucket Cloud | Hosted | Up to 5 users, 50 build minutes, 1 GB LFS | Standard, $3.65 per user a month | Jira and Atlassian teams |
| Azure DevOps | Hosted | First 5 users, unlimited private repos, 1,800 pipeline minutes | $6 per user a month (Basic) | Microsoft and enterprise shops |
| SourceHut | Hosted, open source | Free to contribute; paid to host projects | From $4 a month | Minimalist, email-based workflows |
The table is the short answer. The sections below explain the trade-offs that the price column hides.
Why Developers Look for GitHub Alternatives
GitHub is still the default place to publish code, and for many projects it is the right choice: it has the largest community, the best discovery and the deepest integration with AI coding tools. People look elsewhere for a few recurring reasons.
- Ownership and direction. In August 2025 GitHub's CEO Thomas Dohmke announced he would step down, and GitHub was folded into Microsoft's CoreAI organization instead of running as a semi-independent company. Some maintainers read that as a sign that AI features will keep taking priority.
- High-profile moves. In November 2025 the Zig programming language moved its main repository to Codeberg, citing frustration with GitHub Actions and the push toward AI features. When a well-known project moves, others start asking the same question.
- Control over data. Companies with strict data rules, and anyone who doesn't want their code on a US platform, prefer to host Git themselves or choose an EU-based host.
- Cost at scale. CI minutes, storage and per-seat pricing add up. Self-hosting on your own hardware turns a per-user bill into a server bill.
- Licensing and values. Some open-source communities would rather build on fully free software run by a non-profit.
None of these means GitHub is bad. They mean you have choices, and the right one depends on which of these reasons applies to you.
The Best GitHub Alternatives, One by One
GitLab: the all-in-one platform
GitLab is the closest like-for-like replacement and the most complete. It bundles Git hosting, merge requests, issue boards, CI/CD, a container and package registry, and security scanning in one product. You can use GitLab.com or run the free Community Edition on your own servers.
The catch is the free tier on GitLab.com: a private top-level group is limited to 5 users, with 400 compute minutes and 10 GiB of storage. Public groups don't have the user cap. Premium costs $29 per user a month, which is far more than GitHub Team, so GitLab makes most sense when you'll actually use its built-in CI/CD and security features or when you self-host the free edition.
Codeberg: the non-profit host for open source
Codeberg is run by Codeberg e.V., a registered non-profit association in Berlin, and is funded by donations and membership fees. It runs on Forgejo, offers Codeberg Pages for static sites and Woodpecker-based CI, and has no ads or paid tiers.
It is built for free and open-source software. Its FAQ says private content is meant for contributors to free software, with up to 100 MB of private content for convenience. It asks people who plan to use more than 750 MiB of Git storage, or more than 1.5 GiB of packages, LFS and attachments, to request it first. If you need private company repositories, Codeberg isn't the right home.
Forgejo: self-hosted and community-governed
Forgejo started as a fork of Gitea in 2022 and became a hard fork in February 2024. From version 9.0 it is released under the GPL v3 or later, a copyleft licence like Git's own. It is lightweight (a single Go binary that can use SQLite, PostgreSQL or MySQL), has pull requests, issues, packages, wikis and its own CI called Forgejo Actions, and is the software behind Codeberg.
Choose Forgejo if you want to run your own forge and care that the project is governed by a non-profit rather than a company.
Gitea: the lightweight original
Gitea is the project Forgejo forked from. It is MIT-licensed and still easy to run on a small server. The project is now led by Gitea Ltd, which also sells Gitea Enterprise and a hosted Gitea Cloud. Forgejo's own comparison page calls Gitea "open core" because the cloud offering contains code that isn't in the free version. For many self-hosters, Gitea and Forgejo are still close enough that either works.
Bitbucket: for Atlassian teams
Bitbucket Cloud is free for up to 5 users, with 50 build minutes for Bitbucket Pipelines and 1 GB of LFS storage. Standard costs $3.65 per user a month and Premium $8. Its main strength is integration with Jira and Confluence. If your team already plans work in Jira, Bitbucket removes a lot of glue.
Azure DevOps: for Microsoft shops
Azure DevOps Services includes Azure Repos with unlimited private Git repositories, Azure Boards, Azure Pipelines and test plans. The first 5 users are free on the Basic plan, then it costs $6 per user a month. Each organization gets one Microsoft-hosted parallel job with 1,800 minutes a month. It's a solid choice for enterprises already on Azure, although it is also owned by Microsoft, so it doesn't help if your goal is to leave Microsoft.
SourceHut: minimal and email-driven
SourceHut takes a different approach: no JavaScript-heavy interface, patches reviewed through mailing lists and fast, simple CI. It is still in public alpha. Contributing is free, and hosting your own projects costs $4, $8 or $12 a month (you pick the tier; all tiers get the same features). It suits developers who like the Linux kernel style of collaboration.
AWS CodeCommit: back from the dead
AWS stopped accepting new CodeCommit customers in July 2024, and many "GitHub alternatives" lists still describe it as dead. In November 2025 AWS reversed that and returned CodeCommit to general availability for new customers. It is a plain managed Git host with IAM-based access, useful mainly when everything else you run is on AWS.
GitLab vs GitHub
GitLab vs GitHub is the comparison most teams make first, because the two products cover the same ground.
| GitHub | GitLab | |
|---|---|---|
| Free private repos | Unlimited, unlimited collaborators | Unlimited repos, 5 users per private group |
| Free CI/CD | 2,000 minutes a month | 400 compute minutes a month |
| First paid tier | $4 per user a month | $29 per user a month |
| Self-hosting | GitHub Enterprise Server (paid) | Free Community Edition |
| Built-in extras | Actions, Packages, Codespaces, Copilot | CI/CD, registry, security scanning, planning |
| Community | Largest by far | Smaller, strong in enterprise and DevOps |
In short, GitHub wins on community, free usage for small teams and AI tooling. GitLab wins when you want to self-host for free, or when you want CI/CD, security scanning and planning in one tool without stitching together third-party apps. Many companies use GitLab self-managed internally and keep a GitHub organization for open-source work.
Codeberg vs GitHub
Codeberg vs GitHub is mostly a choice about values and audience. Codeberg is non-profit, runs on free software, has no ads and isn't owned by a large company. GitHub has far more users, so a project there gets more drive-by contributions, stars and discovery.
Codeberg is a strong fit for open-source libraries, tools and community projects, especially in Europe. It is a poor fit for private company code, very large binary assets or teams that depend on the GitHub Marketplace. Some projects keep a read-only mirror on GitHub for visibility while doing the real work on Codeberg, which is what Zig did with its old repository.
Forgejo vs Gitea
Forgejo vs Gitea is the main choice for self-hosters, because the two started from the same code.
| Forgejo | Gitea | |
|---|---|---|
| Licence | GPL v3+ from v9 (older code MIT) | MIT |
| Who runs it | Community, under non-profit Codeberg e.V. | Gitea Ltd plus community |
| Hosted option | Codeberg (for free software) | Gitea Cloud (paid) |
| Built-in CI | Forgejo Actions | Gitea Actions |
Day to day, they look and feel similar. Pick Forgejo if governance and a copyleft licence matter to you. Pick Gitea if you want a company behind the product with paid support, or if a tool you rely on targets Gitea's API specifically. Since the hard fork, their APIs drift apart over time, so check integrations before switching.
Self-Hosted GitHub Alternatives: What You Need
Running your own forge is easier than it sounds, but the products differ a lot in weight.
- Forgejo and Gitea run as a single binary or container with a database. A small virtual server is enough for a team, and backups are a database dump plus the repository folder.
- GitLab self-managed is heavier. GitLab's own requirements page gives 8 vCPU and 16 GB of memory as the baseline for a single-node install, and says it can run with at least 8 GB in memory-constrained setups.
- You own the chores: updates, backups, TLS certificates, SSH access, monitoring and security patches.
If you already run a self-hosted PaaS, our Coolify vs Dokploy comparison covers platforms that can deploy Forgejo or Gitea for you with a few clicks.
Alternative to GitHub Actions
CI is often the hardest part to move, because workflows are written for GitHub's runners and marketplace. Your main options for an alternative to GitHub Actions:
- GitLab CI/CD: mature and built in, configured in
.gitlab-ci.yml. It uses its own syntax, so expect a rewrite. - Forgejo Actions and Gitea Actions: workflows live in
.forgejo/workflows(or.gitea/workflows) and look familiar. Forgejo's docs say it is "designed to be familiar to users of GitHub Actions, but it is not designed to be compatible", so plan on small edits. - Woodpecker CI: a lightweight open-source CI that powers Codeberg CI and works with Forgejo and Gitea.
- Bitbucket Pipelines and Azure Pipelines: good fits if you've moved to those platforms.
A practical approach: keep pipelines simple and move most logic into scripts or a Makefile in the repository. Then the CI file is a thin wrapper, and moving between platforms means rewriting a few lines, not a whole workflow.
Alternatives to GitHub Pages
If you use GitHub Pages for docs or a project site, you have several replacements:
- GitLab Pages builds sites from GitLab CI.
- Codeberg Pages serves static sites for Codeberg repositories.
- Static hosts such as Netlify, Vercel or Cloudflare Pages connect to most Git hosts and deploy on every push.
Outdated Advice: What Changed Recently
Many top-ranking lists of GitHub alternatives haven't been updated, and some recommend services that changed. Before you follow an old list, check these:
| Service | What happened | Status now |
|---|---|---|
| AWS CodeCommit | Closed to new customers in July 2024 | Open again since November 2025 |
| Google Cloud Source Repositories | End of sale on June 17, 2024; new organizations can't enable it | Google points users to Secure Source Manager |
| Gitea | Ownership moved to a company in 2022, which led to the Forgejo fork | Both active; Forgejo is GPL v3+ from v9 |
| Codeberg | Grew into a major host after large projects moved | Still donation-funded, for free software |
This is a good rule for any tooling list: check the vendor's own page and release notes, not a roundup.
How to Move From GitHub Without Breaking Things
Moving the Git history is the easy part: git clone --mirror and git push --mirror copy every branch and tag. The work is in everything around the code.
- Inventory what you use. List repositories, issues, pull requests, wikis, releases, Actions workflows, secrets, webhooks, apps and Pages sites.
- Use the built-in importer. GitLab's GitHub importer brings over issues and pull requests (as merge requests) with comments, plus wikis, labels, milestones, releases and branch protection rules. It doesn't import GitHub organizations or outside collaborators, and it needs a classic personal access token with the
reposcope (or GitHub OAuth). Codeberg and Forgejo's New Migration tool imports issues, labels, wikis, releases and milestones with a GitHub access token. Delete the token afterwards. - Rewrite CI. Port one workflow at a time and run both systems in parallel until the new one is green.
- Move secrets and integrations. Re-create deploy keys, webhooks and CI secrets. Nothing secret should be imported automatically.
- Leave a signpost. Archive the GitHub repository, update the README with the new URL and, if you want visibility, keep a read-only mirror.
If you use git worktrees or local tooling tied to remotes, update the remote URL with git remote set-url origin <new-url>. Our git worktree guide covers remotes shared across worktrees.
Which GitHub Alternative Should You Choose?
- Choose GitLab if your team wants code, CI/CD, security and planning in one place, or you want a free self-managed edition with a big feature set.
- Choose Codeberg if you maintain open-source software and want a non-profit, community-run host.
- Choose Forgejo if you want to self-host a light, fully free forge with community governance.
- Choose Gitea if you want to self-host something light but prefer a company offering support and a hosted plan.
- Choose Bitbucket if your team runs on Jira and Confluence.
- Choose Azure DevOps if you are a Microsoft and Azure enterprise.
- Stay on GitHub if community reach, the Marketplace and AI coding tools matter most. Our guide to the best AI coding assistant shows how tightly those tools now integrate with GitHub.
A common setup is a hybrid: private work on self-hosted Forgejo or GitLab, open-source projects on GitHub or Codeberg.
FAQ
What is the best free GitHub alternative?
For open-source projects, Codeberg is the best free hosted option. For private repositories, GitLab.com's free tier works for teams of up to 5 people, and self-hosted Forgejo or Gitea are free with no user limits.
Is GitLab better than GitHub?
GitLab is better if you want built-in CI/CD, security scanning and a free self-hosted edition. GitHub is better for community, free usage by small teams and AI tool integration. Neither is better for everyone.
Can I self-host a GitHub alternative?
Yes. Forgejo and Gitea are the lightest options and run well on a small server. GitLab Community Edition is free too but needs more resources, with 8 vCPU and 16 GB of memory as its single-node baseline.
Is Codeberg only for open source?
Mostly. Codeberg exists to support free and open-source software. Contributors get a small amount of private space for convenience, but it isn't meant for private commercial projects.
Can I move issues and pull requests off GitHub?
Yes. GitLab's GitHub importer moves issues, pull requests, comments, wikis, labels, milestones and releases. Forgejo and Codeberg's migration tool moves issues, labels, wikis, releases and milestones with a GitHub access token.