GitHub, GitLab and Bitbucket — Sharing the Repository
Git on your laptop keeps your history. But ReadingRoom has three developers and a server that deploys it. Everyone needs one shared copy to push to, and a place to look at each other's changes before they land. That is what a hosting platform gives you.
The rule
Push branches, not main; merge through a reviewed, tested pull request.
GitHub, GitLab and Bitbucket all host Git repositories. The copy they hold is a remote, conventionally named origin.
git clone https://github.com/example/readingroom.git # copy the remote down
git push -u origin add-loans # send your branch up
git pull # fetch and merge others' workOn top of plain Git, each platform adds the same core ideas, with slightly different names:
| Idea | GitHub | GitLab | Bitbucket |
|---|---|---|---|
| Propose a merge | Pull request | Merge request | Pull request |
| Automated checks | GitHub Actions | GitLab CI/CD | Bitbucket Pipelines |
| Track work | Issues | Issues | Jira integration |
A pull request says: "here is my branch; please merge it into main." Teammates comment on the diff, and CI builds the code and runs dotnet test on it automatically. Branch protection can require passing checks and an approval before anything reaches main.
The shortcut
Think of three copies: your laptop, the remote, and main on the remote. Your work travels laptop → remote branch → (pull request) → main. It never jumps straight to main.
Push the branch
git push -u origin add-loansputs your branch on the remote. Main is untouched.
The trap: treating the platforms as different tools to learn from scratch. The Git underneath is identical; only the buttons and names change.
Drills
Answer fast — trust the rule.
What does GitLab call a pull request?
What is origin in git push origin add-loans?
Which feature stops untested code from reaching main?
You switch from GitHub to Bitbucket. What changes about your daily Git commands?
Remember
- Push branches, not main; merge through a reviewed, tested pull request.
- Laptop → remote branch → pull request → main.
- Same Git everywhere; GitLab says merge request.
