In search of the best repository

GitHub vs. GitLab vs. Bitbucket: Which code repo should you choose?

Nataliia Kharchenko
code repos
© Shutterstock / alphaspirit

Choosing a code repository is an important decision. But how can a team make that choice? In this article, Nataliia Kharchenko goes over the pros and cons of each of the three top code repositories.

Code repositories have long become handy assistants for software developers, especially when they work in large teams. So, there is no need to prove that the use of repositories helps a lot in projects’ development. However, when it comes to choosing a suitable code repositories hosts, the diversity of existing ones can be confusing. That’s why we’re going to review three the most popular and help you make a sound decision in case you are hesitating.

What makes a good repository?

Version control systems (or repositories) can be of three major types:

  • Local – All developers are in the same file system.
  • Centralized – Project teams have a single copy of the project on a central server and team members commit changes to one copy.
  • Distributed – Developers work in their local repositories and changes are shared between repositories.

In this article, I’m going to be talking expressly about Git repos. Git repos are the most efficient for development teams. First, let’s find out what components are required to be present in a good repo.

  • Pull request. When users make changes in the source code and push it the repository, their collaborators are notified to get the changes discussed and reviewed.
  • Web-based code review.
  • Editing. If a repository suggests real-time and collaborative editing, it adds a lot to a repo’s quality.
  • Bug tracking. No project is created without bugs. So it’s great when a repository allows to track and resolve bugs collaboratively.
  • Support for markdown syntax to make the code readable.
  • Two-factor authentication to ensure the protection of user accounts.
  • The ability to create forks or clones of repositories.
  • Snippets that let users share segments of code or files with anyone they need – team members, other users or even themselves.
  • Integration with the 3rd party services.
  • Import of repositories. When users move from one service to another, it’s a good idea for repositories to let them import existing projects.
  • Open source license in some cases. Sometimes organizations need to organize an internal repository on their own server instead of using the existing public web resources. The only of the three repositories that is open source is GitLab. The system has a nice interface and is easy to install.

SEE MORE: Microservices: Mono repo vs. multiple repositories

Top 3 repositories

There are three main Git repositories used by developers all over the world. I’ll go over the pros and cons of each one.

GitHub

GitHub is the number-one website for storing git repositories and joint project development. The system is designed to allow users easily create special version control systems that are based on Git. Why is it so popular? Git supports smooth version merges and splits with the help of visualization tools and tools for navigation through nonlinear development history. For now, GitHub hosts more than 50 million open source projects.

Benefits:

There are many features of that let GitHub repository justify its success and popularity.  Here are just a few of them.

  • Bug tracking. This feature belongs to collaborative features and allows to improve the quality of code by keeping records on detected software bugs in the projects.
  • Quick search. The repository provides convenient project structuring which allows efficient searching and sorting. Moreover, well functioning SEO allows users to find any string of code in public repositories.
  • Community. GitHub reports having more than 20 million users as of April 2017. This enormous community of developers worldwide is a great source of shared experience and skills. Users can communicate, comment, make edits and track the news.
  • Sharing. Project source code can not only be copied with Git but also download as an archive.
  • Joint work. GitHub provides efficient features for team management.
  • Compatibility. The projects with the source code located in GitHub can be easily customized to any cloud host services.
  • Supports Git, SVN, HG, TFS import.

Drawbacks:

  • The service is not completely free. To access all the features GitHub has to offer, you should upgrade to a Premium user.
  • Size limitations. The file size can’t be more than 100Mb while the repository can host 1Gb of information.

SEE MORE: “At GitHub, we collaborate far more than just between Devs and Ops”

GitLab

The service is also developed on the basis of Git version control. Despite the fact that GitLab functionality is similar to its main competitor – GitHub, there are a few major peculiarities. GitLab can have a few different forms such as GitLab SAAS that is suitable for enterprises and GitLab Community Edition, an individual solution for users.

Benefits:

  • It’s free. That means users can have an unlimited number of private repositories. To be faithful, it’s all about Community edition and users will have to pay in case they need the Enterprise one. The latter adds some extra features to the basic functionality which improves interaction with online tools, workflow and server management, etc.
  • GitLab operates under an open source license.
  • Bug tracking and web-based code editing.
  • Integration with LDAP (Lightweight Directory Access Protocol) which allows to locate and access various resources on the Internet. GitLab EE supports several LDAP services and group syncing.
  • Supports Git import.

Drawbacks:

  • Relatively slow interface.
  • Frequent tech problems with repositories.

SEE MORE: GitLab 9.2 brings Multiple Assignees For Issues and more

Bitbucket

The service is also very similar to GitHub and mirrors most of its features with slight differences. Bitbucket is best oriented at professional development teams as it provides beneficial conditions to them such as free private repos, Jira integrations, advanced code review and built-in CI/CD. At the same time with the team’s growth, Bitbucket offers milder pricing conditions comparable to GitHub and GitLab. Bitbucket also provides a flexible deployment model for teams.

Benefits:

  • Free private repos and pipelines build minutes for small teams. Small teams mean (up to 5 team members) get an unlimited number of free repositories and 500 build minutes.For its enterprise offering, Bitbucket charges $5 a user per month, while GitHub charges $21

  • Bitbucket had code aware search. Rather than simply indexing your code as text, Bitbucket uses semantic search that analyzes your code syntax, ensuring definitions matching your search term are prioritized over usages and variable names.

  • Bitbucket’s focus on professional teams means you will find features like IP whitelisting and two-step verification to give administrators stronger controls on who can view, push, or clone a private code repository as well as integration with Atlassian ID and Google Login.

  • Bitbucket comes with Trello built-in so you can start with a great free issue tracker or you can leverage existing Jira instance to enable deep integrations like automatic issue transitions and advanced agile workflows. Being owned by Atlassian, these two services are integrated at every stage of development, from branch creating to deployment. With integrated bug tracking components, JIRA automatically updates info about the issue detected.

  • Import of existing Git projects from Excel, Github, etc.

  • Special conditions for students and teachers.
  • Supports Git, CodePlex, Google Code, Mercurial (HG), SourceForge, SVN import.

  • Bitbucket Pipelines gives you end-to-end visibility from coding to deployment. With Bitbucket Pipelines there’s no CI server to setup, user management to configure or repositories to synchronize and the status of your builds shows up in your repo and your Jira tickets automatically.

Drawbacks:

  • Not open source but supports open source projects and free use by OSS projects

SEE MORE: Why pick Bitbucket over GitHub?

Making a choice

As you see, each repository has its strengths and weaknesses. All three of them – GitHub, GitLab and Bitbucket have their loyal audience for a number of reasons.

Of the three repository management services, only GitLab is open source. The source code of GitLab Community Edition is available on their website, the corporate version is proprietary. GitHub, which and hosts the largest number of open source projects, is not open source itself. Bitbucket is not open source, but when you purchase a stand-alone version, the full source code is provided with product configuration options.

Summing up everything said above, I can not say that any of these services is superior to others. They are all powerful and multifunctional services. However, there are specific scenarios when it’s better to use one or another repository:

  • If you need an open source solution, choose GitLab.
  • If you love using Atlassian services, Bitbucket is the best choice.
  • GitHub is a leading platform that hosts open source code projects.

At Cleveroad, we give priority to GitHub as it allows our developers to share their experience and present their open source libraries. Thanks to the free hosting of public projects, this is certainly a social hub for professional developers and anyone who is interested in software development. Anyway, the choice highly depends on the purposes of users. So, try each of the three and make your choice.

Author

Nataliia Kharchenko

Nataliia Kharchenko is a Technical Writer at Cleveroad. It is web and app development company in Ukraine that successfully implements various projects of any complexity. The main goal of the company is to provide clients with quality and exceptional software.


Comments
comments powered by Disqus