My Blog: GitHub or BitBucket (and GitFlow)

03 January 2019

Where to host my project? On the one hand, I love GitHub, and browse it every day… on the other, I use BitBucket at work, and know how useful private repositories can be for developing code without interference.

In the end, it comes down to cost. I'm building the University Package in my spare time, and I don't want to devote too much money to it until I can sell the software as a service and get some income from it.

While Microsoft's GitHub is an excellent repository, with great issue handling (as used to great effect by Orckestra for the C1 CMS), it charges for private repositories. Atlassian's BitBucket does not.

Sourcetree

Hosting on BitBucket also makes another decision easier: which source controller do I use to manage my local Git repository, branches, merges and push/pull to BitBucket.

Atlassian's Sourcetree is free to use, and has a host of options to replace Git's unwieldy command line tools, including support for the Gitflow workflow.

Screen-shot of the Sourcetree user interface managing my Git repository

GitFlowing

If you haven't used it before, I'd recommend that you take a look at Gitflow. This Git work-flow separates features and hot-fixes into their own branches:

  • master: The production version of the software.
    • hotfix: Branches used to quickly patch production releases, which are merged into both the master and develop branches once completed.
    • release: The release candidates of the software, merged into the master branch once quality control confirms that the release candidate works as intended.
    • develop: The working developer version of the software, from which features are branched. Periodically merged into the release branch.
      • feature: Each new feature should reside in its own branch, which is then merged into the develop branch once completed.

Atlassian has published a great beginners guide to using Gitflow to manage Git projects.

[Update]

Well damn! Two days after I upload my project to BitBucket, GitHub announce that they're going to allow free unlimited private repositories.


comments powered by Disqus