← All playbooks
Development migration

Bitbucket → GitHub

Move Bitbucket repositories to GitHub with verified Git history, LFS, identities, pull-request context, branch policy, pipelines, secrets, webhooks, deployment keys, and a mirror-based rollback.

Typical timeline15–30 business days60–110 hours active work
Statusneeds review
Source testedBitbucket Cloud and Data Center paths reviewed 2026-07-19
Destination testedGitHub migration guidance reviewed 2026-07-19
Last reviewed2026-07-19
Sources3
Before you migrate

Should you make this move?

Both platforms have a case. Compare what you gain with what you give up before scheduling the cutover.

Current platform

Bitbucket

Reasons to stay
  • Native Jira integration fits teams already standardized on Atlassian
  • Repository-centered workflows keep code, review, and automation close together
Reasons to leave
  • Its ecosystem and community surface are smaller than GitHub's
  • Advanced governance and automation can become configuration-heavy
New platform

GitHub

What gets better
  • The largest developer ecosystem combines collaboration, automation, and public discovery
  • Repository-centered workflows keep code, review, and automation close together
What gets worse
  • Enterprise planning and governance can require several overlapping GitHub products
  • Advanced governance and automation can become configuration-heavy
Best of the move

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.

Worst of the move

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.

01At a glance

Know the shape of the move.

Transfer outcome10 features audited
Transfer outcome distributionClean transfer: 1, Partial transfer: 3, Manual rebuild: 4, Not transferred: 2.
Clean1
Partial3
Manual4
Lost2
Mapping route7 of 8 fields have a destination path

This timeline assumes

  • Up to 100 repositories with Git, LFS, Pipelines, and common integrations.
  • Bitbucket Cloud uses source-and-history migration; Bitbucket Server/Data Center 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.
02Loss matrix

What survives the move.

“Partial” and “manual” are not footnotes. They are work that must be scheduled and verified.

ItemOutcomeImpactWhat happensMitigation
Git commits, branches, and tagscleancriticalMirror clone and push preserve Git history and refs.Compare every ref tip and run fsck.
Git LFS objectspartialcriticalLFS requires an explicit fetch and transfer.Compare LFS object inventories and checksums.
Pull requests and commentspartialhighCloud source-and-history paths do not carry all collaboration metadata.Archive required history or use the supported enterprise path where eligible.
Issues and wikimanualhighThey require separate migration or archival paths.Export issues and mirror the wiki repository.
Users and groupsmanualcriticalWorkspace membership and permissions do not map automatically.Pre-create teams and identity mapping.
Branch restrictions and merge checksmanualcriticalPolicy semantics differ.Rebuild rulesets, protections, reviews, and CODEOWNERS from intent.
Bitbucket PipelinespartialcriticalGitHub Actions Importer can convert workflows, but manual validation remains.Audit, dry-run, review, and exercise every release path.
Secrets and deployment variableslostcriticalSecret values do not transfer safely.Rotate into protected GitHub environments and secrets.
Downloads, packages, and artifactsmanualhighBinary assets and registries have separate paths.Inventory, copy, checksum, and test consumers.
Webhooks, apps, keys, and integrationslostcriticalInstallation and credential state is platform-specific.Reauthorize or replace each integration.
03Field and feature mapping

Where each thing goes.

SourceDestinationMethodNotes
Workspace/projectOrganization/teammanualDesign namespace and access first.
RepositoryRepositoryautomaticConfirm visibility and default branch.
Git refsGit refsautomaticUse mirror semantics.
Bitbucket userGitHub user/teamtransformMap verified identities.
Branch restrictionRuleset/branch protectionmanualRebuild and negative-test.
bitbucket-pipelines.yml.github/workflows/*.ymltransformUse Actions Importer then review.
Deployment variableEnvironment secretmanualRotate values.
Webhook/appNo destinationunsupportedReinstall or replace.
04Before you begin

Make the move recoverable.

Backup procedure

Create the source-of-truth backup

Preserve repositories and every operational dependency.

  1. Inventory repos, refs, LFS, wikis, PRs, issues, policies, pipelines, runners, secrets, artifacts, and integrations.
  2. Mirror clone repos and wikis, fetch all LFS, and run fsck.
  3. Export collaboration counts and required metadata.
  4. Checksum assets and record secret names/consumers.
  5. Test one restore.

Proof to capture: A repository manifest reconciles refs, objects, metadata, policy, CI, assets, and integrations.

Transformation · GitHub Actions Importer

CI conversion

Create reviewed GitHub Actions workflows.

  1. Audit pipelines.
  2. Run dry-run conversion.
  3. 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.

Transformation · Migration workbook

Policy and identity map

Recreate least privilege and merge controls.

  1. Map users and teams.
  2. Map restrictions to rulesets.
  3. Run forbidden-action tests.

Proof to capture: Save the input, output, command or tool settings, warnings, and final item counts.

05Handle with care

The things most likely to hurt.

These are operating limits. Treat every “Stop if” condition as a blocked migration, not a suggestion.

Cutover

Repositories diverge

criticalpossible likelihood

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

CI permissions broaden

criticalpossible likelihood

Untrusted workflows read protected secrets.

Consequence
Infrastructure compromise.
Mitigation
Minimize token permissions and protect environments.

Stop if: A pull request can access production credentials.

Access

Policy disappears

criticalpossible likelihood

Forbidden push or merge succeeds.

Consequence
Unreviewed code reaches production.
Mitigation
Run negative role tests.

Stop if: Any required control fails.

06Precise timeline

Do the work in this order.

Estimate forUp to 100 repositories
Total elapsed15–30 business days
Active work60–110 hours
BufferAdd time for complex pipelines, large LFS, or enterprise metadata migration.
01
Days 1–4Inventory4 days
02
Days 5–7Mirrors3 days
03
Days 8–12Pilot5 days
04
Days 13–22Migration waves6–10 days
05
Days 23–30Final mirror and observation5–8 days
  1. 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 checkpoint

    Back up?

    Go when: Every repo and production dependency has an owner.

    Stop when: Critical CI or secret consumer is unknown.

  2. 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 checkpoint

    Pilot?

    Go when: Refs, LFS, wiki, and assets reconcile.

    Stop when: Any critical object is missing.

  3. 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 checkpoint

    Waves?

    Go when: All repo archetypes pass.

    Stop when: Data, policy, or CI fails.

  4. Days 13–22 · waves

    Migration waves

    15–32 hours active6–10 days elapsedImports and reviews waiting
    • Migrate by dependency.
    • Reconcile each repo and integration.

    Depends on: Pilot

    Stop / go checkpoint

    Cut over?

    Go when: Every repo is complete or excepted.

    Stop when: Any critical variance remains.

  5. Days 23–30 · cutover

    Final mirror and observation

    4–12 hours active5–8 days elapsedNormal workflows waiting
    • Freeze and mirror final refs.
    • Switch CI, remotes, webhooks, and deploys.
    • Observe releases.

    Depends on: Waves

    Stop / go checkpoint

    Close rollback?

    Go when: Two release paths and all checks pass.

    Stop when: A critical source write or integration remains.

07The point of change

Cut over with a way back.

Go live

Cutover

Make GitHub the only writable code and CI control plane.

Recommended window: A low-release Friday with staffed verification.

  1. Freeze Bitbucket writes and deploys.
  2. Mirror final Git and LFS refs.
  3. Rotate secrets and switch CI.
  4. Switch remotes, webhooks, apps, and deployment keys.
  5. Run policy and release tests.
  6. Lock Bitbucket.

Proof to capture: Refs match and GitHub alone completes a protected release and rollback.

Return to safety

Rollback

Restore Bitbucket without losing GitHub commits.

Deadline: Within 72 hours.

  1. Freeze GitHub.
  2. Mirror new refs to quarantine.
  3. Push approved refs to Bitbucket.
  4. Restore pipelines, secrets, policy, and integrations.
  5. Run release tests.

Proof to capture: Bitbucket contains approved refs and completes the protected release path.

Rollback immediately when
  • Missing refs or LFS
  • Policy bypass
  • Production pipeline failure
  • Access exposure
  • Critical integration failure
08Verification report

Prove the migration worked.

Every blocking check must pass. Capture the evidence before cleanup begins.

0%
Interactive report preview0 / 8 checks passed
PassIDCheckMethodExpected resultEvidence
V-01BlockingRefsCompare all tips and fsck.Exact parity.Ref diff.
V-02BlockingObjectsCompare inventories and downloads.Every pointer resolves.LFS report.
V-03BlockingPRs, issues, and wikiReconcile counts or archive disposition.100% accounted for.Metadata report.
V-04BlockingMembershipTest role accounts.Least privilege.Access matrix.
V-05BlockingMerge controlsAttempt forbidden actions.All are blocked.Negative tests.
V-06BlockingRelease pathRun build through rollback.Approved result.Workflow runs.
V-07BlockingBinary availabilityCompare checksums.Critical assets match.Asset manifest.
V-08BlockingEvent deliveryTrigger each integration.One GitHub event.Delivery log.
09Post-migration cleanup

Remove the scaffolding safely.

Safe after: Two successful releases and 30 stable days.

  1. Archive mirrors and evidence.
  2. Revoke Bitbucket tokens and keys.
  3. Remove old runners and webhooks.
  4. Keep Bitbucket read-only through retention.
  5. Update development documentation.
  6. Schedule quarterly access, policy, secret, and restore reviews.
Sources and maintenance

Built to be reviewed.

Tested 2026-07-19. Next scheduled review: 2026-10-19.

  1. GitHub: migration paths to GitHubAccessed 2026-07-19
  2. GitHub: migrate Bitbucket PipelinesAccessed 2026-07-19
  3. GitHub: import external Git repositoryAccessed 2026-07-19