Moving from GitHub to Bitbucket – Why and How
I was recently tasked with the assignment of moving all of the Top Draw GitHub repositories over to Bitbucket. When I was assigned this task, my first thought was, “What the heck is Bitbucket?” I had heard the name before but had never dug any deeper into it. For those of you who, like me, don’t know what Bitbucket is, here’s its description according to its website: “Bitbucket is the Git solution for professional teams.”
Key Takeaways about Migrating from GitHub to Bitbucket
- Bitbucket functions as a web-based Git hosting service that offers comprehensive project management capabilities alongside core version control features for software development teams, making it an alternative solution for professional teams.
- Top Draw transitioned from GitHub to Bitbucket primarily because Bitbucket offers unlimited private repositories regardless of plan tier, which became essential as their company grew and worked with more clients requiring private code storage.
- Unlike GitHub’s repository-based pricing model that charges $25/month for just 10 private repositories up to $2050/month for 1500 repositories, Bitbucket uses a team-size pricing structure that significantly reduces costs for smaller development teams.
- Development teams experience a seamless transition process when moving to Bitbucket because it uses identical Git commands to GitHub and requires no new technical knowledge, allowing Top Draw to transfer all repositories in just a few hours.
- The migration process from GitHub to Bitbucket involves four main steps: backing up your GitHub repository, obtaining the HTTPS clone URL, importing the existing repository into Bitbucket, and completing the import process with proper authentication credentials.
- GitHub issues and wikis require separate migration procedures since they don’t transfer automatically during repository import, but resources exist to make this additional migration task straightforward for users with command line knowledge.
- Despite transitioning to Bitbucket for business use, the author still considers GitHub the superior platform for open-source sharing and community collaboration, suggesting that developers should consider using both platforms for different purposes.
- Bitbucket particularly suits commercial and business applications where private repository quantity becomes a significant factor in version control system selection.
My second thought after being assigned this task was, “Why are we doing this? I love GitHub!” If you’re a developer, you can probably relate to me when I say that GitHub is my source for everything from jQuery plugins to grid frameworks to PHP libraries, so why would we abandon it?
Understanding Bitbucket’s Role in Version Control Systems for Development Teams
Bitbucket, similar to GitHub, is a web-based Git hosting service for your software development projects. It offers free private repositories with free private wikis on accounts of up to 5 users. Bitbucket is primarily used for commercial projects rather than open source contributions. As one of the largest Git hosting services on the web, Bitbucket provides comprehensive project management capabilities alongside its core version control functionality.
Key Motivations for Transitioning from GitHub to Bitbucket for Business Use
As a first-time user, I didn’t notice that much difference from GitHub (other than the user interface). I was able to browse my code, see my commits, clone, push and pull my repositories just as I did on GitHub. So why move from our beloved GitHub over to Bitbucket? While we could give you an extensive list of why we chose to host with Bitbucket, here are a few of our key reasons:
Unlimited Private Repositories for Growing Companies
As our company grows and we work with more and more clients, the number of private repositories in our GitHub account also grows.
GitHub’s free account doesn’t allow for private repos and their lowest paid option (for organizations) only allows up to 10 private repos. We outgrew that number very quickly. We found ourselves constantly having to upgrade our account to accommodate our growth. Bitbucket, on the other hand, offers unlimited private repositories regardless of your plan tier. This was a huge factor as we would no longer have to worry about running out of private repository space!
Cost-Effective Pricing Model Based on Team Size
Not only was it cumbersome to have to upgrade our accounts due to growth, it was also getting expensive.
GitHub’s pricing model is based on the number of private repositories you require. Starting from 10 private repos for $25.00/month all the way up to 1500 repos for $2050.00/month.
Unlike GitHub, Bitbucket structures its pricing differently. Bitbucket offers all of its pricing plans with unlimited private repositories. Instead of basing their pricing on repository quantity, they calculate it based on the number of users allowed on the account.
And because we have a smaller development team, we are able to cut our costs significantly while maintaining all the version control capabilities we need.
Seamless Transition Process for Development Teams
Whenever we change from what we know, we get nervous. A lot of questions get raised: Is it difficult to use? Will we need to learn new Git commands? Is it going to take us weeks or months to transfer everything over?
The answer to all of those questions is, no. Bitbucket is extremely user-friendly, uses the exact same Git commands as GitHub, and took only a few hours to transfer all of our repositories over. The familiar Git workflow remains unchanged, making the transition painless for our development team.
Step-by-Step Guide to Migrating Repositories from GitHub to Bitbucket
Bitbucket makes it extremely easy to transfer your repositories from GitHub. Here are the detailed steps on how to do so:
Backing Up Your GitHub Repository for Safe Migration
The first thing we did was backup our repositories in case something unexpected happened during the transfer process. To create a backup, you can simply go to your GitHub repository and click the Download ZIP button in the repository interface. This downloads a complete snapshot of your codebase as it exists at that moment.
Obtaining the HTTPS Clone URL for Repository Transfer
We chose to transfer via the HTTP clone URL method. The clone URL can be found right next to the Download ZIP button that you just clicked (there is even a convenient copy-to-clipboard button). This URL contains all the information needed for Bitbucket to locate and import your GitHub repository.
Importing Your Repository into Bitbucket’s Platform
Next, you will want to log into your Bitbucket account and create a repository. Then, instead of filling out the required information manually, you can import an existing repository by clicking the import link in the top right corner of the interface (or navigate directly to https://bitbucket.org/repo/import if you are already logged in).
Completing the Repository Import Process on Bitbucket
Fill out the required information requested by Bitbucket’s import form and click the “Import Repository” button. The form will ask for the source URL and authentication details for accessing your GitHub repository.
Note: If your authorization credentials are incorrect, you may receive an error message. Simply navigate back to the form, fill out the information correctly and attempt the import again.
Successful Completion of GitHub to Bitbucket Migration
Just like that, we have now successfully imported our GitHub repository into our Bitbucket account. The entire codebase, including commit history, branches, and tags, is now available in your Bitbucket workspace.
Transferring Wikis and Issues from GitHub to Bitbucket
One challenge we encountered was that GitHub issues and wikis didn’t transfer over as part of the initial repository import. However, we found some resources that made this additional migration task fairly straightforward, provided you have some command line knowledge. Check these helpful resources out:
http://codetheory.in/export-your-issues-and-wikis-from-github-repo-and-import-to-bitbucket-migration/
https://github.com/sorich87/github-to-bitbucket-issues-migration
https://confluence.atlassian.com/bitbucket/export-or-import-issue-data-330797432.html
Embracing Both GitHub and Bitbucket for Different Development Needs
While I love GitHub, and still crown it the King of open-source sharing and community collaboration, I have to tip my hat to Bitbucket for their cost-effective pricing and for making the process of transferring repositories as easy as possible. I was skeptical about the change over at first, but after working with Bitbucket, I would strongly suggest anyone working with large numbers of private repositories consider Bitbucket as a viable alternative, especially for commercial and business applications where private repository quantity is a significant factor.