Tutorial: Learn about Bitbucket pull requests
Objective
Create a repository and get to work in your workspace. We’ll also provide some details on adding a reviewer (or teammate) to your repository so you can collaborate on your code.
Mission Brief
So far, you've been the only person working in a repository. But what if you wanted to collaborate with your colleagues? You can do that, whether you're in the same room or across the universe.
Time
15 minutes
Audience
You have some experience using Bitbucket Cloud. If not, try out one of our beginner tutorials.
Prerequisites
- You have a version control tool
- You have signed up for Bitbucket
About branches and pull requests
When you work on a workspace with multiple Bitbucket users, you'll want to work on your own set of code separately from the main codebase. Branches allow you to do just that. A branch represents an independent line of development for your repository. Think of it as a brand new working directory, staging area, and project history. After you create a branch, you work on and commit code to that branch, pull updates from Bitbucket to keep your branch up-to-date, and then push all your work to Bitbucket.
Once you've made code changes on a branch in Bitbucket, you can create a pull request, which is where code review takes place. Your fellow crew members can comment on your code with feedback and questions and eventually (hopefully) approve the pull request. When you have enough approvals, merge the pull request to merge your branch into the main code.
So far, you've been the only person working in a repository. But what if you wanted to collaborate with your colleagues? You can do that, whether you're in the same room or across the universe.