Bitbucket → GitHub
Move scoped Bitbucket repositories to GitHub, with pull-request metadata available only for eligible Server/Data Center 5.14+ migrations through GitHub Enterprise Importer; Cloud uses source-and-history-only migration.
Should you make this move?
Both platforms have a case. Compare what you gain with what you give up before scheduling the cutover.
Bitbucket
- Native Jira integration fits teams already standardized on Atlassian
- Repository-centered workflows keep code, review, and automation close together
- Its ecosystem and community surface are smaller than GitHub's
- Advanced governance and automation can become configuration-heavy
GitHub
- The largest developer ecosystem combines collaboration, automation, and public discovery
- Repository-centered workflows keep code, review, and automation close together
- Enterprise planning and governance can require several overlapping GitHub products
- Advanced governance and automation can become configuration-heavy
GitHub: The largest developer ecosystem combines collaboration, automation, and public discovery. This removes a major source-side concern: Its ecosystem and community surface are smaller than GitHub's.
What you lose: Native Jira integration fits teams already standardized on Atlassian. What you inherit: Enterprise planning and governance can require several overlapping GitHub products.
Jump to a section
Know the shape of the move.
This timeline assumes
- Editorial planning scale: up to 100 repositories with Git, LFS, Pipelines, and common integrations.
- Bitbucket Cloud uses a source-and-history-only path; Bitbucket Server/Data Center 5.14 or later may use GitHub Enterprise Importer.
- Production deploys freeze during final mirror and CI switch.
- All repositories and wikis receive offline mirror backups.
- Secrets are rotated rather than exported.
What survives the move.
“Partial” and “manual” are not footnotes. They are work that must be scheduled and verified.
| Item | Outcome | Impact | What happens | Mitigation |
|---|---|---|---|---|
| Scoped user branches, tags, and commits | clean | critical | Mirror clone and push preserve the approved user-ref history; provider-owned or synthetic refs are classified separately. | Record the approved ref scope, compare those tips and commit graphs, and run fsck. |
| Git LFS objects | manual | critical | GitHub Enterprise Importer does not migrate LFS objects; source-and-history moves also require a separate LFS transfer. | Fetch and push LFS separately, then compare object inventories and checksums. |
| Pull requests and comments — Bitbucket Cloud | lost | high | The supported Bitbucket Cloud path carries Git source and history, not pull-request collaboration metadata. | Archive required pull requests and link the archive from GitHub. |
| Pull requests and comments — Server/Data Center 5.14+ | partial | high | GitHub Enterprise Importer migrates pull requests, comments, reviews, line comments, required reviewers, and attachments, subject to migration limits and logs. | Pilot representative pull requests and reconcile the importer logs. |
| Issues and wiki | manual | high | They require separate migration or archival paths. | Export issues and mirror the wiki repository. |
| Contribution attribution and mannequins | partial | high | Eligible Server/Data Center metadata imports can create mannequins for source authors; reclaiming attribution does not grant live repository access. | Map and reclaim mannequins separately from team membership and permission provisioning. |
| Live access, branch restrictions, and repository settings | manual | critical | The Server/Data Center importer does not migrate branch permissions, repository settings, or live access; imported repositories are private by default. Reclaimed mannequins restore attribution only. | Provision teams and repository roles separately, then rebuild rulesets, settings, reviews, and CODEOWNERS before granting write access. |
| Git and archive limits | partial | critical | Limits include a 2 GiB single commit, 255-byte refs, 100 MiB final files, 400 MiB files during GEI, and a public-preview 40 GiB combined Git data plus metadata repository archive limit for Server/Data Center GEI. | Scan and remediate limit violations before production migration. |
| Personal repositories — Server/Data Center | lost | high | GitHub Enterprise Importer does not migrate Bitbucket personal repositories. | Move approved personal repositories into a migratable project first or use a separate source-and-history path. |
| Commit comments — Server/Data Center | lost | medium | GitHub Enterprise Importer does not migrate commit comments. | Archive required commit-comment context and link it from the destination repository. |
| Bitbucket Pipelines | partial | critical | GitHub Actions Importer can convert workflows, but manual validation remains. | Audit, dry-run, review, and exercise every release path. |
| Secrets and deployment variables | lost | critical | Secret values do not transfer safely. | Rotate into protected GitHub environments and secrets. |
| Downloads, packages, and artifacts | manual | high | Binary assets and registries have separate paths. | Inventory, copy, checksum, and test consumers. |
| Webhooks, apps, keys, and integrations | lost | critical | Installation and credential state is platform-specific. | Reauthorize or replace each integration. |
Where each thing goes.
| Source | Destination | Method | Notes |
|---|---|---|---|
| Workspace/project | Organization/team | manual | Design namespace and access first. |
| Repository | Repository | automatic | Confirm visibility and default branch. |
| Approved user branches and tags | GitHub branches and tags | automatic | Compare the approved ref scope and classify provider-owned refs separately. |
| Bitbucket Server/Data Center contribution author | GitHub mannequin or reclaimed attribution | transform | Only eligible Server/Data Center GEI metadata imports create this path; Cloud source-only migration does not, and attribution remains separate from live permissions. |
| Branch restriction | Ruleset/branch protection | manual | Rebuild and negative-test. |
| bitbucket-pipelines.yml | .github/workflows/*.yml | transform | Use Actions Importer then review. |
| Deployment variable | Environment secret | manual | Rotate values. |
| Webhook/app | No destination | unsupported | Reinstall or replace. |
Make the move recoverable.
Create the source-of-truth backup
Preserve repositories and every operational dependency.
- Inventory repos, refs, LFS, wikis, PRs, issues, policies, pipelines, runners, secrets, artifacts, and integrations.
- Mirror clone repos and wikis, fetch all LFS, and run fsck.
- Export collaboration counts and required metadata.
- Checksum assets and record secret names/consumers.
- Test one restore.
Proof to capture: A repository manifest reconciles refs, objects, metadata, policy, CI, assets, and integrations.
CI conversion
Create reviewed GitHub Actions workflows.
- Audit pipelines.
- Run dry-run conversion.
- Review permissions and test build, release, deploy, and rollback.
Proof to capture: Save the input, output, command or tool settings, warnings, and final item counts.
Policy and identity map
Recreate least privilege and merge controls.
- Map users and teams.
- Map restrictions to rulesets.
- Run forbidden-action tests.
Proof to capture: Save the input, output, command or tool settings, warnings, and final item counts.
The things most likely to hurt.
These are operating limits. Treat every “Stop if” condition as a blocked migration, not a suggestion.
Repositories diverge
A Bitbucket ref advances after final mirror.
- Consequence
- Code and releases split.
- Mitigation
- Freeze writes and lock the source.
Stop if: Any uncaptured source ref advances.
CI permissions broaden
Untrusted workflows read protected secrets.
- Consequence
- Infrastructure compromise.
- Mitigation
- Minimize token permissions and protect environments.
Stop if: A pull request can access production credentials.
Policy disappears
Forbidden push or merge succeeds.
- Consequence
- Unreviewed code reaches production.
- Mitigation
- Run negative role tests.
Stop if: Any required control fails.
Do the work in this order.
- Days 1–4 · inventory
Inventory
16–24 hours active4 days elapsedOwner review waiting- Inventory data and dependencies.
- Design organizations, teams, policy, and waves.
Depends on: Admins
Stop / go checkpointBack up?
Go when: Every repo and production dependency has an owner.
Stop when: Critical CI or secret consumer is unknown.
- Days 5–7 · backup
Mirrors
10–18 hours active3 days elapsedClone and LFS transfer waiting- Create mirrors and metadata archives.
- Validate restore.
Depends on: Scope
Stop / go checkpointPilot?
Go when: Refs, LFS, wiki, and assets reconcile.
Stop when: Any critical object is missing.
- Days 8–12 · pilot
Pilot
15–24 hours active5 days elapsedCI runs waiting- Migrate representative repos.
- Translate CI and policies.
- Test release and rollback.
Depends on: Backup
Stop / go checkpointWaves?
Go when: All repo archetypes pass.
Stop when: Data, policy, or CI fails.
- Days 13–22 · waves
Migration waves
15–32 hours active6–10 days elapsedImports and reviews waiting- Freeze writes before each Server/Data Center GEI production migration; use a separately controlled final mirror for Cloud repositories.
- Reconcile scoped refs, pull requests, comments, reviews, attachments, mannequins, and logs; keep every Server/Data Center source frozen until final cutover completes.
Depends on: Pilot
Stop / go checkpointCut over?
Go when: Every repo is complete or excepted.
Stop when: Any critical variance remains.
- Days 23–30 · cutover
Final mirror and observation
4–12 hours active5–8 days elapsedNormal workflows waiting- Keep Server/Data Center repositories frozen through the control-plane switch; freeze Cloud and mirror its final approved refs.
- Switch CI, remotes, webhooks, and deploys only after route-specific data and metadata reconciliation.
- Observe releases before lifting any retained source access.
Depends on: Waves
Stop / go checkpointClose rollback?
Go when: Two release paths and all checks pass.
Stop when: A critical source write or integration remains.
Cut over with a way back.
Cutover
Make GitHub the only writable code and CI control plane.
- Freeze each Server/Data Center repository before its GEI migration and keep it frozen through reconciliation; freeze Cloud before its final mirror.
- Transfer the scoped Git refs and LFS objects through the selected route.
- Rotate secrets and switch CI.
- Switch remotes, webhooks, apps, and deployment keys.
- Run policy and release tests.
- Lock Bitbucket.
Proof to capture: Scoped refs match and GitHub alone completes a protected release and rollback.
Rollback
Restore Bitbucket without losing GitHub commits.
- Freeze GitHub.
- Mirror new refs to quarantine.
- Push approved refs to Bitbucket.
- Restore pipelines, secrets, policy, and integrations.
- Run release tests.
Proof to capture: Bitbucket contains approved refs and completes the protected release path.
- Missing refs or LFS
- Policy bypass
- Production pipeline failure
- Access exposure
- Critical integration failure
Prove the migration worked.
Every blocking check must pass. Capture the evidence before cleanup begins.
| Pass | ID | Check | Method | Expected result | Evidence |
|---|---|---|---|---|---|
V-01Blocking | Approved user refs | Compare only approved branch and tag tips, classify provider-owned refs separately, and run fsck. | Exact parity for the approved user-ref scope. | Ref diff. | |
V-02Blocking | Objects | Compare inventories and downloads. | Every pointer resolves. | LFS report. | |
V-03Blocking | Route-specific metadata | For Server/Data Center GEI, reconcile pull requests, comments, reviews, attachments, and mannequins before lifting the freeze; for Cloud, verify the approved archive disposition. | Every scoped metadata class is migrated through GEI or explicitly archived for the Cloud source-only route. | Metadata report. | |
V-04Blocking | Membership | Test role accounts. | Least privilege. | Access matrix. | |
V-05Blocking | Merge controls | Attempt forbidden actions. | All are blocked. | Negative tests. | |
V-06Blocking | Release path | Run build through rollback. | Approved result. | Workflow runs. | |
V-07Blocking | Binary availability | Compare checksums. | Critical assets match. | Asset manifest. | |
V-08Blocking | Event delivery | Trigger each integration. | One GitHub event. | Delivery log. |
Remove the scaffolding safely.
Safe after: Two successful releases and 30 stable days.
- Archive mirrors and evidence.
- Revoke Bitbucket tokens and keys.
- Remove old runners and webhooks.
- Keep Bitbucket read-only through retention.
- Update development documentation.
- Schedule quarterly access, policy, secret, and restore reviews.
When the plan met reality.
First-hand accounts are preferred. Vendor case studies are labeled, and every note below is an editorial paraphrase—follow the link for the full context.
A team that completed its Bitbucket-to-GitHub move discovered that its SonarQube Cloud organization remained bound to Bitbucket. The apparent solution was to create a new organization, but community guidance documented a less obvious account and administrator handoff that could preserve the existing setup. The report is a compact example of a downstream integration retaining source-platform identity after repositories have moved.
- Inventory security, quality, deployment, and identity services that are bound to the Bitbucket organization rather than individual repositories.
- Test destination authentication for every organization administrator before revoking Bitbucket access or deleting the source workspace.
- Repository migration completed before the surrounding code-quality organization had a valid destination identity and ownership path.
- The required fix depended on login order and administrator assignment, making it easy to miss in a repository-focused checklist.
Verify against the primary material.
Platform behavior changes. Check these sources and the review dates above before executing a production migration.
- GitHub: migration paths to GitHubAccessed 2026-07-27
- GitHub: migrate Bitbucket PipelinesAccessed 2026-07-27
- GitHub: import external Git repositoryAccessed 2026-07-27
- GitHub: Bitbucket Server and Data Center migration coverageAccessed 2026-07-27
- GitHub: Bitbucket Server and Data Center migration overviewAccessed 2026-07-27