Award Confetti logo-bs logo-dxn logo-odl Magento Piggy Bank 09AEAE68-D07E-4D40-8D42-8F832C1A04EC 79C8C7E9-0D9D-48AB-B03B-2589EFEE9380 1A734D92-E752-46DD-AA03-14CE6F5DAD57 E622E2D4-3B9C-4211-8FC3-A1CE90B7DFB2 Group 19

Why we moved to GitHub

At JH, we work on a huge amount of code bases. Each project we start or inherit will have it’s own repository. During the development of projects we will abstract certain re-usable modules, so they can be maintained in a simpler manner and used on other projects independent of the original project. On top of this, we maintain our own private Magento distributions so we can easily patch them, we maintain various tools to aid the development process and we also host various open source tools.

What this essentially means is we spent a great deal of time working with our overlord, Git. Git is a version control system which allows us to record and revert incremental changes. Version control systems should not get in the way of developers, it exists to aid them.

Why GitHub?

For us, Bitbucket lacked in various areas. Some people swear by Bitbucket, but since our move to GitHub, our experiences with version control has become much more pleasant. Some of the initial reasons we wanted to make the jump:

  • No Two Factor Auth (This is no longer the case, Bitbucket supports Two Factor Auth)
  • GitHub UI is more intuitive to navigate and work with
  • GitHub issues are much more powerful (labels, milestones)
  • GitHub PR’s are much nicer (Split diffs, less cluttered UI, Status API is cleaner)
  • The Community is on GitHub
  • Switching between two services is fairly cumbersome
  • Deploy issues related to Bitbucket (Not directly Bitbucket’s fault)

There were a few cons to weigh up also:

  • GitHub is more expensive
  • GitHub limits the number of private repositories available

In our opinion, the advantages far outweighed the disadvantages, and if we worked smarter, we could avoid them altogether. We decided to achieve this by archiving lots of old projects which were just hanging around and taking up space.

We also had a Beanstalk account utilising one of higher tiers, which we did not really use anymore. We archived the majority of those, the money we saved there covered the majority of the costs for GitHub.

How we performed the migration

We first identified all of the repositories we could archive. A small script was written to clone those repositories, zip them up and move them to a backed-up, external storage drive.

For the repositories in use, we wrote a PHP script using the following API wrappers for GitHub and Bitbucket:

The script did a few things:

  1. Clone each repository to be migrated
  2. Create the respective repository on GitHub
  3. Send all branches, issues & wiki’s over to GitHub.

We then removed and de-activated our Bitbucket account.

After the migration we would need to modify all of our deploy scripts for each project, we use Capistrano to deploy and the repository URL is set in the configuration. We decided to update this manually as each project needed to be deployed. This caused a few hiccups with SSH authentication, but was quickly solved.

How we benefitted from the move

  • Our deploys are much faster – Composer, our dependency manager of choice, is more optimised to work with GitHub
  • We are more collaborative – We code-review more, we use labels to coordinate efforts on PR’s such as code-review-pending and code-review-complete
  • We trimmed a lot of deprecated repositories
  • We get more involved with open source, we push fixes, provide support and inform projects of issues.
  • We now have one central area for source code control, we no longer have to switch between GitHub and Bitbucket throughout the day.

Open Source

Being a Magento partner, the bulk of our work revolves around that. Magento is open source and we also support open source. You can see our open source work here on GitHub. We also support and contribute to various other projects, not limited to BrowserSync, &

Our developers truly believe in the spirit of open source and many of us contribute in our spare time as well.

GitHub at JH

For us, GitHub was a natural progression. It facilitated a more thorough and organised code review process and it allowed us to be closer to the community. We continue to learn and grow through this collaboration. When making your decision on which VCS to use, do check the pricing as GitHub and Bitbucket have largely different approaches to pricing, GitHub with a strong emphasis on open-source