comparison / 16 — updated may 2026

GitHub vs GitLab vs Gitea vs Codeberg vs SourceHut

Leaving GitHub? Here's how GitLab, Gitea, Codeberg, and SourceHut stack up — DevOps platform, self-hostable open source, non-profit hosted, or pay-what-you-can minimalist. All credible homes for code that don't depend on Microsoft's roadmap.

free tier
GitHubfree unlimited public + private
GitLabfree 5 users · 400 CI mins
Giteaself-host free · MIT
Codebergfree forever · non-profit
SourceHutfree public-alpha tier · limited
entry paid
GitHub$4/user Team
GitLab$29/user Premium (annual)
Gitea$9.50/mo Cloud
Codeberg$0 (donate optional)
SourceHut$5/$10/$15 pay-what-you-can
license / governance
GitHubproprietary · Microsoft
GitLabopen core · GitLab Inc.
GiteaMIT · open source
CodebergAGPL fork · non-profit e.V.
SourceHutAGPL · individual proprietor
updated
May 2026
verdict.txt — comparisons/github-alternatives.mdhonest
$cat verdict.txt

GitLab if you want the closest GitHub-equivalent with built-in CI/CD ($29/user Premium, free up to 5 users). Gitea if self-host on a $5 VPS is the dream (MIT, single Go binary). Codeberg if you want hosted-free + open-source values + EU non-profit governance ($0, donation-funded). SourceHut if minimalist hacker-shape and pay-what-you-can match your values ($5-15/mo). GitHub still wins for ecosystem (Actions, Copilot, Codespaces, network effects).

scoreboard / at a glance

At a glance

One row per dimension, the values side-by-side. The olive dot marks the clear winner for that dimension when there is one — most rows are a wash, and that’s the point.

Microsoft

GitHub

The incumbent. Free unlimited public + private repos for individuals, $4/user Team, $21/user Enterprise. Best ecosystem — Actions, Copilot, Codespaces, network effects.

GitLab Inc.

GitLab

DevOps platform — Git hosting + CI/CD + security + project management bundled. Free up to 5 users, Premium $29/user (annual), Ultimate $99/user. Open core model.

Gitea Ltd.

Gitea

MIT-licensed lightweight Git platform. Single Go binary, runs anywhere. Self-host free; Gitea Cloud $9.50/mo if you want managed.

Codeberg e.V.

Codeberg

Non-profit hosted Gitea instance. Free forever for FOSS projects, donation-funded, EU-based. The 'GitHub for principled open-source' option.

SourceHut (Drew DeVault)

SourceHut

Minimalist hacker-shape Git platform. Pay-what-you-can ($5-15/mo), no per-user fees, no JavaScript-heavy UI. AGPL, individually run.

Free tierGitHub's free tier is best for individuals — unlimited private repos with 2k CI minutes. GitLab caps at 5 users. Codeberg is free forever but FOSS-focused. Gitea/SourceHut require either self-host work or paid plans for full features.
best · unlimited public + private + 2k CI mins
good · 5 user cap · 400 CI mins
yes · self-host free forever (MIT)
yes · free hosted forever (donation-funded)
limited · public alpha tier without builds
Cheapest paid tierSourceHut $5/mo is the cheapest paid option (no per-user pricing). Gitea Cloud at $9.50/mo flat is solid value. GitHub Team at $4/user is cheap per-seat but multiplies fast. GitLab Premium jumps to $29/user.
$4/user Team
$29/user Premium (annual only)
$9.50/mo Cloud · flat
donate optional · no required paid
$5/mo (pay-what-you-can)
Open sourceGitea MIT is the most permissive open-source license. GitLab Community Edition exists but the SaaS adds proprietary features. SourceHut and Codeberg are AGPL. GitHub is closed source.
no · proprietary
open core · Community Edition exists
yes · MIT · most permissive
yes · AGPL (Gitea fork-based)
yes · AGPL
Self-hostableGitea's single Go binary is the easiest self-host in this set. GitLab Self-Managed works but requires real ops (Postgres, Redis, Sidekiq, GitLab Runners). GitHub Enterprise Server is paid-only. Codeberg uses Gitea-derived self-host. SourceHut is harder to self-host (multiple services).
GitHub Enterprise Server (paid only)
GitLab Self-Managed (free + paid tiers)
yes · single Go binary · $5 VPS
yes · Gitea-based self-host
yes · ops-heavy · single proprietor
CI/CDGitHub Actions has the largest marketplace and best ecosystem. GitLab CI is the most integrated DevOps experience. Gitea Actions adopted the GitHub Actions YAML format, so workflows are portable. Codeberg uses Woodpecker. SourceHut's CI is intentionally simple.
GitHub Actions · best ecosystem · 2k mins free
GitLab CI · powerful · 400 mins free
Gitea Actions (GitHub Actions compatible)
Codeberg CI (Woodpecker) · for FOSS
builds.sr.ht · simple · subscription-only
Network effectsGitHub's 100M+ developers is the network-effect moat — discovery, contributors, employer signals all flow from being there. GitLab has a strong DevOps community. The smaller alternatives trade network reach for principles, control, or simplicity.
best · ~100M developers · ecosystem
good · DevOps platform community
growing · self-host community
growing · FOSS-aligned developers
small · principled community
Best for shapeEach fits a different shape. GitHub for default open-source work. GitLab for teams that genuinely use DevOps platform features. Gitea for self-hosters. Codeberg for FOSS-aligned developers. SourceHut for minimalists who want a principled stand.
general dev work · open-source collab
DevOps platform · CI/CD-heavy teams
self-host · privacy-first · simple infra
FOSS principles · EU governance · donation-funded
minimalist · CLI-first · principled choice
pricing / three scenarios

Pricing at three scales

Three receipts, three scales. The line items are the same; the prices move. Every number is from the public May 2026 pricing page — we round to the nearest dollar but don’t invent.

solo dev.txt — 1 user · personal projects + open sourcemonthly
LINE ITEMGitHubGitLabGiteaCodebergSourceHut
Git hostFree · unlimited reposfreeFree · individualfree$5 VPS · self-host$5Free · donate when ablefree$5 pay-what-you-can$5
TOTAL · monthlyfreefree$5/mofree$5/mo
>Solo developers get GitHub and GitLab free with full features. Codeberg is free hosted (consider donating if you use it heavily). Gitea costs only the $5 VPS for self-host. SourceHut's minimum $5/mo is the only one that's purely paid — but it bundles all services with no per-user fees.
small team.txt — 5 users · private repos · some CI/CDmonthly
LINE ITEMGitHubGitLabGiteaCodebergSourceHut
Git hostTeam · $4 × 5$20Free (5 user cap)free$10 VPS · self-host$10Free · self-managed donationsfree$10 · same flat rate$10
TOTAL · monthly$20/mofree$10/mofree$10/mo
>GitLab is free at 5 users — meaningfully cheaper than GitHub Team at $20/mo. Codeberg is free hosted. Gitea self-host stays cheap ($10 VPS handles 5 users easily). SourceHut $10/mo flat doesn't change with team size. The 5-user threshold is exactly where GitLab's free tier ends, so plan accordingly.
larger team.txt — 20 users · private repos · production CI/CDmonthly
LINE ITEMGitHubGitLabGiteaCodebergSourceHut
Git hostTeam · $4 × 20$80Premium · $29 × 20 (annual)$580$20 VPS + self-host (or $9.50 Cloud)$20Free hosted (donate generously)free$15 · flat, no per-user$15
TOTAL · monthly$80/mo$580/mo$20/mofree$15/mo
>At 20 users the pricing differences become real. GitHub Team at $80 is cheap per-seat. GitLab Premium jumps to $580/mo — DevOps platform features have to justify the bill. Gitea self-host stays at $20 VPS. Codeberg costs nothing but consider donating $50-100/mo if you depend on it. SourceHut's $15 flat (no per-user) is the cheapest serious option for teams.
verdict / pick one

When to pick which

pick / github

Pick GitHub if…

  • Ecosystem and network effects are the deciding factor — Actions marketplace, Copilot, Codespaces, GitHub Sponsors, employer signal.
  • Open-source collaboration is your shape — most contributors are already on GitHub, fork-and-PR flow is friction-free.
  • Free unlimited private repos with 2k CI minutes is generous for individuals and small projects.
  • Microsoft + GitHub integrations matter (VS Code, Azure, Office 365).
  • Default choice for the broadest dev audience without explicit reasons to leave.
pick / gitlab

Pick GitLab if…

  • DevOps platform features are the deciding factor — CI/CD, security scanning, project management, container registry all bundled.
  • Self-host on your own infrastructure matters — GitLab Self-Managed Community Edition is genuine open core.
  • 5-user free tier is enough for your team — meaningfully more generous than GitHub Team paid.
  • You want GitHub-equivalent feature set without depending on Microsoft.
  • Compliance shape — GitLab Ultimate's SAST/DAST/dependency scanning matters for regulated industries.
pick / gitea

Pick Gitea if…

  • Self-host is the deciding feature — single Go binary, no Docker required, runs on $5 VPS.
  • MIT license matters — most permissive in this set, fully forkable for any use case.
  • Lightweight is the priority — Gitea uses dramatically less RAM than GitLab Self-Managed.
  • GitHub Actions compatibility — Gitea Actions adopted the same YAML format, workflows are portable.
  • Privacy-first / on-prem requirements (regulated industries, internal-only repos).
pick / codeberg

Pick Codeberg if…

  • FOSS principles + EU governance matter — Codeberg e.V. is a Berlin-based non-profit answerable to members, not investors.
  • Free hosted forever — no paid tiers, no upgrade walls, just sustainable donations.
  • You're building free/libre/open-source software and want a home that aligns with those values.
  • Concerned about US-controlled platforms (Microsoft + GitHub specifically) and want a European alternative.
  • Codeberg Pages for static site hosting is included free.
pick / sourcehut

Pick SourceHut if…

  • Minimalist hacker-shape UI is the deciding feature — no JavaScript-heavy interfaces, email-based workflows, plain HTML.
  • Pay-what-you-can ethos matters — SourceHut's $5-15 tiers are honor-system pricing aligned with your means.
  • No per-user pricing — entire team uses one subscription regardless of size.
  • Email-driven patches and mailing lists fit your workflow (kernel-style development culture).
  • Drew DeVault's ethos and editorial direction align with your values.
gotchas / observed

Gotchas, both directions

Common pitfalls visible in public docs and community discussion. None of these will stop you shipping; all of them will cost you an afternoon if you don’t know about them.

  • GitHub / Microsoft acquisition concerns

    Owned by Microsoft since 2018

    GitHub has been a Microsoft subsidiary since 2018. For most developers this is invisible — GitHub operates independently with its own roadmap. But some teams want code hosted with a non-Microsoft-controlled platform for principled reasons (concentration of dev infrastructure, AI training on code, etc.). If this matters to you, it's the main reason to consider alternatives.

  • GitLab / annual billing only

    Premium and Ultimate are annual prepay — no monthly option

    GitLab Premium ($29/user) and Ultimate ($99/user) are billed annually upfront. There is no monthly billing for paid tiers. For a 10-person team that's $3,480/year ($290/mo equivalent) committed up front — a real decision moment vs GitHub's monthly Team plan.

  • Gitea / self-host operational cost

    Self-host means you're operations

    Gitea self-host is free in software cost but you're responsible for the VPS, backups, security updates, TLS certs, and uptime monitoring. Plan $5-10/mo VPS plus your time. For small teams it's straightforward; for production-grade hosting consider Gitea Cloud ($9.50/mo) or a managed Gitea service (Elestio $16/mo, HostedGitea $24/mo).

  • Codeberg / FOSS-only soft restriction

    Closed-source projects are tolerated but not the focus

    Codeberg's mission is free/libre/open-source software. Closed-source private repos are allowed but discouraged in spirit. For commercial closed-source work, you may want to host elsewhere (Gitea self-host, GitHub Team, GitLab) and use Codeberg for your open-source contributions specifically.

  • SourceHut / public alpha and pricing changes

    Still officially in alpha; pricing proposed to increase

    SourceHut has been in public alpha for years with paid tiers at $2/$4/$8 originally, recently raised to $5/$10/$15 in early 2026. The platform is stable but the 'pricing might change as we leave alpha' framing is real. For most teams this isn't an issue but it's the platform's stated honest position.

  • All / migration friction

    Git history transfers cleanly but everything else doesn't

    All Git platforms preserve commit history, branches, and tags on migration via `git clone --mirror` and `git push --mirror`. What doesn't transfer: issues, pull-request history, comments, wiki content, CI configurations, releases metadata, integrations. Plan 1-2 weeks for a non-trivial migration; some metadata migration tools exist (e.g., gh-migration) but most teams accept some context loss.

migration / observed patterns

Migrating between them

Editorial framing only — we have not migrated either way ourselves. What follows is the pattern visible in public post-mortems, GitHub issue threads, and conference talks. Take it as observed-pattern, not lived experience.

GitHub ━▶ GitLab

The closest like-for-like migration. GitLab has a built-in GitHub Importer that transfers repos, issues, pull requests, comments, wiki, and milestones. Plan 1 day per non-trivial repo for the data; longer for CI configuration migration (GitHub Actions YAML → GitLab CI YAML is not a 1:1 translation).

The harder shift is mental — GitLab's UI puts CI/CD front-and-center where GitHub buries Actions under tabs. Plan a week to acclimate. If your team uses heavy GitHub-specific features (Codespaces, Discussions, Sponsors), evaluate whether GitLab equivalents fit before committing.

GitHub ━▶ Gitea (self-host)

Migration for teams wanting on-prem control. Gitea's built-in GitHub migration tool handles repos with full commit history, issues, pull requests, labels, releases, and wiki pages. The mirror function can also keep Gitea synced with GitHub during the transition.

Operational setup is the work: spin up a Linux VPS, install Gitea (single binary), configure HTTPS via reverse proxy or built-in ACME, set up backups. Plan 1-2 days for the setup, 1-2 weeks for full team adoption. Add Gitea Actions Runners if you need CI/CD.

GitHub ━▶ Codeberg (FOSS only)

Migration for open-source projects committing to free/libre values. Codeberg has documentation on importing from GitHub via Gitea's importer (Codeberg runs Forgejo, a Gitea fork). All Git history, issues, and PRs transfer.

The migration is straightforward technically. The cultural shift is bigger — your contributors need to make Codeberg accounts (smaller barrier in 2026 than it used to be), CI moves from Actions to Woodpecker (compatible YAML format helps), and you lose GitHub's network discovery. Worth it for projects where the principles matter.

faq / common questions

Frequently asked

Is GitHub free?
Yes for most use cases. GitHub Free includes unlimited public and private repositories, 2,000 CI/CD minutes per month, 500 MB Packages storage, and basic features for individuals and small teams. Paid tiers ($4/user Team, $21/user Enterprise) add team management, advanced auditing, SAML SSO, and security features. Most individual developers and small teams never need to pay.
What's the best self-hosted GitHub alternative?
Gitea is the most popular self-hosted GitHub alternative — MIT-licensed, single Go binary, runs on a $5 VPS, GitHub-Actions-compatible CI runner. GitLab Community Edition is a more feature-complete alternative if you need DevOps platform features (CI/CD, security scanning, project management) but it's heavier (Postgres + Redis + Sidekiq + Runners). For tiny teams, Forgejo (a Gitea fork) is similar.
Is Codeberg really free forever?
Yes. Codeberg is operated by Codeberg e.V., a registered non-profit association in Berlin, Germany. It's funded by voluntary donations and association memberships. There are no paid tiers, no premium features, and no usage limits for typical projects. The non-profit model means there's no business pressure to monetize — but if you use Codeberg heavily, consider donating €5-20/month to support the running costs.
Can I move from GitHub to GitLab and keep my history?
Yes. GitLab has a built-in GitHub Importer that transfers Git history, branches, tags, issues, pull requests (renamed to merge requests), comments, wiki, and milestones. The repo itself migrates losslessly because Git is distributed. What doesn't transfer cleanly: GitHub Actions workflows (need rewriting in GitLab CI YAML), GitHub-specific features (Codespaces, Discussions, Sponsors), and some metadata in Issues/PRs. Plan 1-2 days per non-trivial repo.
How does SourceHut's pay-what-you-can pricing work?
SourceHut offers three suggested tiers ($5, $10, $15 per month) that all unlock the same features. You pay what you can afford — there's no difference in service level. If you can't pay the suggested rates, you can apply for financial aid. The model rejects per-user pricing entirely; one subscription covers your entire team. The honor-system approach is part of SourceHut's principled positioning.
Is GitLab actually open source?
GitLab uses an open-core model. GitLab Community Edition (CE) is open source under the MIT license and includes Git hosting, basic CI/CD, and core collaboration features. GitLab Enterprise Edition (EE) — which powers GitLab.com SaaS and the paid Self-Managed tiers — is proprietary and adds Premium/Ultimate features. You can self-host CE for free forever; if you want SAST/DAST/portfolio management you need the proprietary EE features.
Which has the best CI/CD?
GitHub Actions has the largest marketplace and the best ecosystem — most third-party services ship official Actions, and the workflow YAML is well-documented. GitLab CI is the most integrated DevOps experience — pipelines feel like a first-class part of the platform. Gitea Actions adopted the same YAML format as GitHub Actions, so workflows are portable between them. For minimal CI needs SourceHut's builds.sr.ht is intentionally simple. Most teams find GitHub Actions or GitLab CI sufficient.