Pull Requests on GitHub, GitLab and Bitbucket
A teammate pushes a one-line change straight to main on a Friday afternoon, and notes-api goes down. Nobody reviewed it and no tests ran. Every hosting platform offers the same cure: changes arrive as proposals that are checked before they are merged.
The rule
Never push straight to main; propose a branch and let checks and people review it.
A pull request (GitHub and Bitbucket) or merge request (GitLab) is the same idea under two names: "please merge my branch into main". It shows the diff, collects review comments, and runs automated checks such as tests and linting. Branch protection rules can then require passing checks and at least one approval before the merge button works, and block direct pushes to main.
The three big hosts differ mostly in what surrounds the repo:
| Platform | Known for |
|---|---|
| GitHub | The largest open-source community; GitHub Actions for automation |
| GitLab | CI/CD built into the product; can be self-hosted on your own servers |
| Bitbucket | Part of Atlassian's tools, with close Jira integration; Bitbucket Pipelines for CI |
Git itself is identical on all three, so your commands never change. Only the web workflow and the pipeline configuration file differ.
A small, focused pull request gets a better review than a huge one. A useful description says what changed, why, and how it was tested.
The shortcut
Remember the loop as six beats: branch, push, open, check, review, merge. Then delete the branch. Whatever the platform, the same loop applies.
Branch and push
git switch -c fix/timeout, commit,git push -u origin fix/timeout.
The trap: treating review as a rubber stamp. The reviewer's job is to understand the change, and the author's job is to make that easy by keeping it small.
Drills
Answer fast — trust the rule.
What does GitLab call a pull request?
Which setting stops people pushing directly to main and requires approval first?
During review you push a new commit to the same branch. What happens to the open pull request?
Which platform is best known for built-in CI/CD and the option to self-host?
Remember
- Never push straight to main; propose a branch and let checks and people review it.
- Shortcut: branch, push, open, check, review, merge, then delete the branch.
- Trap: huge pull requests and rubber-stamp reviews.
