A code repository is an archive of the code that is being worked on. Beyond the code itself, you can keep things such as documentation, notes, web pages, and other items in your repository. A code repository is required for any successful software development project.
Updated on 9/13/2022: GitHub now offers unlimited private repositories on their free tier, and has added GitHub Actions, which is a suite of CI/CD tools and workflow automations. We have updated our review to reflect this.
If we use a house as an analogy, we can break things down further. The house itself would be analogous to your software product as a whole, with the architecture and materials of the house being analogous to the code. Where does your house go? On your land. In our analogy, your repository is like the land that your house sits on.
A repository (or repo for short) can be public or private. There is something special to say about the developer community when it comes to collaboration. You see levels of collaboration amongst coders taking steps beyond many other industries. Very often, you will find public repos, where people give their code out for anyone to use. Sometimes, people keep their repos public because it is an accomplishment for others to be implementing your code in their product. In other cases, open repos help stimulate innovation, as quicker innovation can happen when there are many people working on the same project.
Why You Need a Code Repository Hosting Service
So what's so special about the different repo hosting services out there, and why do you even need one? You can run your repository just from your own machine with no extra tools, but when it comes to collaborating with others, you're better off using a hosting service that can run your repo from the cloud.
Here's where you might say, "But I'm the client, not the developer, I don't need to collaborate with developers!" Think back to the house analogy. If you, the client, don't care about getting access to the repo, that's like saying the construction company can build YOUR house in their own backyard. How are you going to get the house transferred from their land to yours? It's difficult, and if the construction company never gives you their address, they can just ghost you and you'll never see the house.
But if you build the house in the cloud (OK...the analogy is starting to break down), you can access it from anywhere, and transferring ownership is as easy as pressing a button. So you need to choose the best cloud provider out there for hosting your code repository. To stretch the house analogy, think of this like building your house on a futuristic hovering plot of land that can be transported anywhere with a click of a button. It's not in your backyard, nor is it in your construction company's backyard — it's in the cloud.
There are three repository hosting services that we find not only most common, but also most feature-rich: GitHub, GitLab, and Bitbucket. All three are great services, but come with their own pros and cons. If you're looking to compare GitHub, GitLab, and Bitbucket for working with external or offshore teams, look no further!
GitHub is one of the most popular code repositories out there. Aloa uses GitHub for many of our client projects. It is a great repository for documentation purposes and is commonly used for collaboration. If you are working in teams, with other developers, GitHub is a great starting spot.
GitHub offers a list of popular features:
- Commit history is visible
- Pull requests
- Issue tracking
- Email notifications
- Robust and well-documented API
- Unlimited private repositories
- A wide array of workflow automations and CI/CD through GitHub Actions
The reason Aloa uses GitHub for our client projects is because of their free team plan with unlimited private repositories, with unlimited collaborators. Private repos are important for client work because oftentimes clients will not want their project code exposed to the public. Previously, you could only invite 3 collaborators to private repos, making it a poor choice for outsourcing. Now in 2022, anyone can get started with their own private repository without paying a penny or worrying about collaboration restrictions.
GitHub also recently added GitHub Actions, a comprehensive suite of workflow automation and CI/CD tools. Previous critics of GitHub had lamented the fact that there were no built-in CI/CD tools, but GitHub has now addressed this concern.
GitLab is also a very common repository. Aloa uses GitLab for some of our clients as well. Just as GitHub does, GitLab offers many of the same features: visible commit history, pull requests, issue tracking.
GitLab has a slightly more user-friendly interface than GitHub. GitLab offers robust CI/CD pipelines and workflow automation, which was previously their biggest competitive advantage over GitHub. We recommend GitLab for highly technical teams who aren't planning on collaborating outside of their organization as much, but GitHub wins overall due to their fair pricing and similar feature set..
Like GitLab and GitHub, Bitbucket also offers a free tier for private repositories. Aloa uses Bitbucket for a few of our Clients as well. Another bonus to Bitbucket is that it has a REST API to build 3rd party applications. You can also search for code in a dynamic and efficient manner.
- Like GitHub, Bitbucket offers many similar features:
- Commit history
- Pull requests
- Issue tracking
In recent years, GitHub and GitLab have made improvements to their UI that unfortunately put Bitbucket in the back seat. Bitbucket has been heavily criticized in the past for their slow UI and feature focus on managers and not developers. However, if your team already uses Jira or other Atlassian products, Bitbucket might be the best option.
Summary - GitHub vs. GitLab vs. Bitbucket
We hope this short comparison was helpful in both understanding code repositories and choosing the best repo hosting service for you. There's more in-depth feature comparisons elsewhere on the internet, but we wanted to provide our perspective comparing GitHub, GitLab, and Bitbucket for working with external or offshore teams.
In many cases, you're going to choose a code repo hosting service based on what your developers prefer. If you want free repositories, then GitHub or GitLab are going to be your best options. Bitbucket have a limit of five users on their free tier, making it less attractive, while GitHub and GitLab offer free private repositories with unlimited collaborators. Bitbucket has more features geared toward analytics and managers, so many companies look to Bitbucket over GitHub and GitLab for that reason.
If you have any specific questions, and want to get our take on repositories, feel free to reach out to us at email@example.com!