Tutorial: Learn about pull requests in Bitbucket Cloud

Objective

Add an inspirational quote to a teammate's repository.

Mission Brief

So far, you've been the only person working in a repository that you own. But what if while your team is off traveling the universe, and you want to be able to collaborate on the same repository? You can do that with a repository already started by one of your teammates.

Time

15 minutes

Audience

You have some experience using Bitbucket Cloud. If not, try out one of our beginner tutorials.

Prerequisites

About Forking

When you work with another user's public Bitbucket repository, typically you have read access to the code but not write access. This is where the concept of forking comes in. Here's how it works:
  • Fork the repository to copy it to your own account.
  • Clone the forked repository from Bitbucket to your local system.
  • Make changes to the local repository.
  • Push the changes to your forked repository on Bitbucket.
  • Create a pull request from the original repository you forked to add the changes you made.
  • Wait for the repository owner to accept or reject your changes.

If a repository owner accepts the pull request, Bitbucket merges your code changes into the original repository. It is recommended that you work with forks and pull requests, even if the repository owner gives you write access to a public repository. While a pull is part of the Git and Mercurial workflow, pull requests and forks are concepts used only by repository hosting services — like Bitbucket.

 

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport