Moving from GitHub to Bitbucket – Why and How
I was recently tasked with the assignment of moving all of the Top Draw GitHub repos 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.”
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?
What is Bitbucket, exactly?
Bitbucket, similar to GitHub, is a web based GIT hosting service for your projects. It offers free private repositories with free private wikis on accounts of up to 5 users. Preferably used for companies and not open source, Bitbucket is one of the largest GIT hosting services on the web.
Why did we move away from GitHub?
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 repos 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:
1. Unlimited Private Repos
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 repos. This was a huge factor as we would no longer have to worry about running out of private repository space!
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 repos 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 does things a little different. Bitbucket offers all of its pricing plans with unlimited private repos. Instead of basing their pricing from repos, they do it by users allowed on the account.
And because we have a smaller development team, we are able to cut our costs.
3. Ease of Change
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 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 commands, and took only a few hours to transfer all of our repos over.
How did we transfer to Bitbucket?
Bitbucket makes it extremely easy to transfer your repos from GitHub. Here are the steps on how to do so:
1. Backup your GitHub repo
The first thing we did was backup our repos in case something bad happened in the transfer. To do so, you can simply go to your repo and click the Download ZIP button.
2. Copy your HTTPS clone URL
We chose to transfer via the HTTP clone URL. The clone URL can be found right next to the Download ZIP button that you just clicked (there is even a nice copy-to-clipboard button).
3. Import your repo into Bitbucket
Next, you will want to log into your Bitbucket account and create a repository. Then, instead of filling out the required information, you can import a repository by clicking the link in the top right corner (or https://bitbucket.org/repo/import if you are logged in).
4. Fill out the information required
Fill out the required information from Bitbucket and click the “Import Repository” button.
Note: If your authorization credentials are wrong, you may get an error. Simply click back, fill out the information correctly and import again.
And that’s all folks!
Just like that, we have now imported our GitHub repo into our BitBucket account.
A note about wikis and issues
One problem was that issues and wikis didn’t transfer over as part of my initial import. However, we found some resources that made the task fairly easy, provided you have some command line knowledge. Check these out:
Love enough for two…
While I love GitHub, and still crown it the King of open-source sharing, I have to tip my hat to Bitbucket for their price 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 repos consider Bitbucket an option.