OUR BLOG
Insights

How I Used Claude to Migrate From Bitbucket to GitHub

4 Min READ

Bitbucket and GitHub are both places where companies store and manage their source code. Think of them as a combination of cloud storage and a detailed history log for every change a developer makes. Every time someone on our team writes or updates code, it gets saved there, which means it's also where years of our clients' work product lives. We were long overdue to migrate to GitHub and Claude made it quick and easy.

Why Migrate?

We had been meaning to get off Bitbucket for a while. It was costing us money every month, and we were paying for the privilege of using an interface we didn't like. It was clunky and weirdly tangled up with the rest of the Atlassian product suite that we didn't need or want.

The breaking point was billing. We got overcharged monthly with no real explanation. So I called support to sort it out and got a recording telling me to call back during business hours, while I was calling during business hours! Their online support wasn't any better.

GitHub, by comparison is free for what we need, has a much simpler interface and doesn't try to upsell you into an entire ecosystem just to manage code. We had also already integrated it with Cloudflare Workers and Pages, which we use to host several of our websites, so consolidating there wasn't just cheaper. It closed a gap in tooling we already relied upon.

Why Did We Wait So Long?

The catch was scope. We are a busy team. This wasn't one tidy repo we were talking about here. It was 53 repositories spread across four different Bitbucket workspaces. Some of them were active, some of them were ancient and a few we had genuinely forgotten existed until they showed up in a list. Doing this by hand, one repo at a time was exactly the kind of task we had been putting off. The obvious choice  would have been to create a spreadsheet, write a script, test, debug, rinse and repeat. Sounds more efficient right? Yes, but it still required time that we didn't have.

So instead, I asked Claude to just do it.

Start Small, Then Go All In

I didn't hand the whole thing over to Claude all at once. I started with a single test repo to make sure the approach would even work. Once that went smoothly I gave Claude the rest of the list, workspace by workspace.

The one thing I insisted on the whole way through was that every repository had to land on GitHub as private. Nothing was going public by accident. This was our clients' proprietary information here.

The Manual Part

Claude couldn't just wave a wand and pull everything over. GitHub and Bitbucket don't talk to each other automatically, and for good reason. So there was a small amount of manual work I had to do on my end:

  1. Generating a couple of API tokens — I generated an API token for Bitbucket and another one for GitHub so Claude had permission to read from one side and write to the other without me handing over my actual account passwords.
  2. Creating each destination repo on GitHub myself —Claude's access was deliberately restricted from creating new repos on its own, which was a safety guardrail I appreciated.

That second task was slightly tedious, but Claude made it relatively painless. It gave me a batch of pre-filled links, so creating an empty private repo was just click, click, done, repeated a few dozen times over the course of just a few minutes.

The Part Claude Just... Did

Once the API tokens were generated and the empty repos were created in GitHub, Claude's job was to pull each repo's full history including every branch and every commit from Bitbucket, then push it into its new GitHub home. Claude did this behind the scenes 53 times, one after another, mostly without me needing to do anything but watch progress updates roll by while I focused on other other tasks.

It wasn't entirely uneventful. A couple of the older repos had giant files buried in their history including old video assets that ran straight into GitHub's hard file size limit. Rather than get stuck trying to force it, Claude flagged the specific problem repos and we made a pragmatic call. The problem repos were historical projects, so I only cared about most the current code. I didn't need to preserve years and years of history. So we just grabbed the latest version and moved on.

It also caught a naming collision from two different Bitbucket repos that happened to share the same name in different workspaces. I didn't see the need for separate workspaces, so Claude asked me how I wanted to tell them apart instead of guessing and quietly overwriting one. We only had to slightly rename one repo, and then we on.

The Time Math

Here's the part I actually cared about. My own personal time spent on this was maybe an hour total, mostly generating tokens, clicking "create repo" links and answering the occasional judgment call Claude couldn't make on its own. No scripting, no reading API docs, no staring at a terminal.

Claude's side was the opposite. It performed dozens of repeated, careful, slightly tedious operations, all 53 of them done consistently and correctly. This included the tricky ones with duplicate names or oversized files. That's exactly the kind of work that's easy to mess up when a human does it 53 times by hand. Besides, a human doing it 53 times by hand or even creating spreadsheets and scripts is a bad use of anyone's Tuesday.

The Long Tail

The migration wasn't quite "one and done," either. One of our developers hadn't fully cut over to GitHub yet, so one Bitbucket repo had 1 new commit after we had already migrated it once. That was to be expected.

The next day, I just asked Claude to re-sync that one repo and it pulled over everything that had changed since. There was no need to re-explain the whole setup and no need to start over. It was just a quick, direct request that worked because the context was still there. It took one prompt from me and maybe 3 minutes of Claude's time.

Would I Do It This Way Again?

Absolutely! The honest comparison wasn't "Claude vs. Scripting vs. Manual Work". It was "Claude vs. me finding an excuse to never do this at all." Bitbucket's lack of support and overcharging us made the case easy for me.

The end of the story is 53 repos, one overpriced platform I was glad to leave, and one hour of my Tuesday well spent.

If you need help migrating any of your technology to a new platform, hit us up! Until next time...

Related Articles

Building a Website with AI: Part 1 - Lessons from a Greenfield Project

4 Min READ

Integration AI

What It Means to Be a Microsoft AI Cloud Partner

5 Min READ

integrations Integration AI Microsoft Data Management

Should you be doing subscription commerce?
Download our FREE WHITEPAPER to learn how Subscription Commerce can increase customer loyalty, reduce churn rates and generate recurring revenue.
Download Now