# Collaborating on Hosted Repositories

> Use GitHub, GitLab or Bitbucket for pull requests, code review, issues and branch protection. Free notes, key concepts, resources and a mini project.

Canonical: https://www.internhack.in/roadmaps/tracks/backend/repo-hosting
Last updated: 2026-11-28

Use GitHub, GitLab or Bitbucket for pull requests, code review, issues and branch protection.

Beginner · about 3 hours · difficulty 1/5

Learn first: [Version Control with Git](https://www.internhack.in/roadmaps/tracks/backend/git-version-control)

Git itself is local; a **hosting platform** gives your team a shared remote plus collaboration features. The concepts are nearly identical across platforms, so learn one well.

### What you do on these platforms

- **Pull requests / merge requests**: propose a branch for merging, discuss it line by line and require approvals.
- **Code review**: read others' changes critically but kindly; look for correctness, clarity, tests and security, not just style.
- **Branch protection**: require passing CI and at least one review before anything reaches `main`.
- **Issues and projects**: track bugs and features, link them to PRs.
- **Forks**: contribute to projects you do not have write access to (the open source workflow).

### A healthy team workflow

Most teams use a variant of **trunk-based development**: short-lived feature branches, small PRs, merge to `main` often, deploy from `main`. Long-running branches that drift for weeks cause painful merges.

### Pitfalls

- Huge PRs that nobody can meaningfully review. Aim for changes a reviewer can understand in 15-20 minutes.
- Leaving CI red and merging anyway.

You are ready to move on when you have opened a PR with a clear description, responded to review comments and merged it with CI passing, ideally on an open source project.

## Key concepts

- **GitHub**: Largest community and open source ecosystem.
- **GitLab**
- **Bitbucket**
- **Pull requests and code review**
- **Branch protection rules**
- **Forking workflow**
- **Trunk-based development**

## Mini project

Fork a small open source project, fix a typo or tiny bug, and open a pull request following its contribution guide.

## Check yourself

Why do teams require CI to pass and a review before merging into main?

## Free resources

- [GitHub Docs](https://docs.github.com/en) (GitHub)
- [GitLab Docs](https://docs.gitlab.com/) (GitLab)
- [Bitbucket Cloud support](https://support.atlassian.com/bitbucket-cloud/) (Atlassian)

Previous: [Version Control with Git](https://www.internhack.in/roadmaps/tracks/backend/git-version-control) · Next: [JavaScript on the Server with Node.js](https://www.internhack.in/roadmaps/tracks/backend/nodejs)

## More in Your Daily Toolkit: Terminal and Git

- [Linux and the Command Line](https://www.internhack.in/roadmaps/tracks/backend/linux-terminal)
- [Version Control with Git](https://www.internhack.in/roadmaps/tracks/backend/git-version-control)
- [Collaborating on Hosted Repositories](https://www.internhack.in/roadmaps/tracks/backend/repo-hosting)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Backend Developer Roadmap](https://www.internhack.in/roadmaps/tracks/backend)
