Skip to content
BENIBIX Learn

GitHub, GitLab and Bitbucket

Level 4 · Remotes and GitHub

The three big sites that host Git repos, and what each one adds to Git. How GitHub Issues tracks bugs, and how one line in a pull request closes one.

Course contentsLesson 10 of 13

After this lesson you can

  • Say what a Git host adds to Git
  • Compare GitHub, GitLab and Bitbucket
  • Close an issue from a pull request

12 mincovers 5 glossary entries

Worth reading first: Git Clone, Push and Pull

What a Git host adds, and how the three differ

GitHub, GitLab and Bitbucket are websites that keep Git repos online, so a team has one shared copy to push to and pull from. They add what Git leaves out: a web page for each repo, a list of bugs and tasks, a place to review changes, and tests that run on each push. GitHub opened in 2008.

Git itself does none of this. It saves history and moves commits between copies. Everything with a button, a comment or an email comes from the host. That is why you can move to a new host by pushing the same repo to a new remote, and keep every commit.

GitHub is the biggest of the three. Most public projects live there, so it is the site you will clone from most often. Its request to join a branch is called a pull request. Its system for running tests on each push is called GitHub Actions.

GitLab does the same job, with some words changed. A pull request there is called a merge request. Its system for running tests is built into the same product. A company can also run all of GitLab on its own servers, instead of on GitLab's site.

Bitbucket is made by the same firm as Jira, the task tracker. Its big draw is that link. A branch or commit that names a Jira task, such as SHOP-42, shows up on that task in Jira. Teams that already plan their work in Jira often pick Bitbucket for that reason.

GitHub Issues is the to-do list beside the code. Each issue gets a number, a title and a thread for talk. You can label it, give it to a person and put it on a board. GitLab has its own version, and Bitbucket teams often use Jira for the same job.

An issue can close itself. Write Closes #42 in a pull request, and issue 42 closes the moment that request is merged. Fixes and Resolves work the same way. It only works when the request is merged into the repo's default branch, which is usually main.

People often pick a host on its list of features. The lists are close enough that they rarely decide much. What matters more is what your team already uses. Where do your other repos live? Where do you track tasks? Which one does your company already pay for?

The three Git hosts

HostA request to merge is calledKnown for
GitHubPull requestMost public projects live here
GitLabMerge requestTests built in, and you can run it yourself
BitbucketPull requestIts link to Jira

Which one to pick

  1. 1

    GitHub

    When you work in public, or want the most people and tools to already know your host.

  2. 2

    GitLab

    When your company wants the whole thing on its own servers.

  3. 3

    Bitbucket

    When your team already plans each task in Jira.

All three hosts run the same flow. Issue 42 closes by itself when the request that names it is merged.

Worked example

A bug closes itself

Emma's shop has issue #42: the basket forgets items after 10 minutes. She fixes it on a branch and writes Closes #42 in the pull request.

When a teammate merges it into main, issue #42 closes by itself, with a link to the fix. Nobody has to remember to tidy the list.

The words for this lesson5

Check yourself

What is a merge request in GitLab?

Finished this lesson?

Marking it complete also marks its 5 glossary entries learned, which updates your roadmap and your saved page. 0 are already marked.