Create a pull request to merge your change

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

  1. Fork a teammate's repository
  2. Copy your fork and make a change to the repository
  3. Create a pull request to merge your change

To inspire your teammate's with words of wisdom, you can request your change to get added to the original repository. To do that, you create a pull request.

Step 1. Compare your fork to the original

While you were working on adding your quote, another teammate might have made updates to the original repository. At this point, you can check that and decide if you need to adjust your fork accordingly. Do the following to compare your changes with the repository:

  1. Log into Bitbucket and navigate to your myteamquotes repository. Forked repositories have a special widget that lets you compare your fork work to the original.
  2. Click + in the global sidebar, then click Compare branches or tags under Get to work. The Compare page has a specialized view that is available only in forked repositories.
  3. Press the Compare button to compare your forked repository to the original repository.
  4. If you want to see the differences between your current repository and the original repository, click the Diff tab to compare changes. If there are multiple commits, you see their cumulative changes by file in this section. Click the Side-by-side diff button to see changes displayed side-by-side. Or press the View file button to view the full file in Bitbucket.
  5. Switch back to the Commits tab to see the list of commits pushed from your local repository to the fork in Bitbucket. To see the contents of a specific commit in isolation, click a Commit link and Bitbucket takes you to the Commits page.

Step 2. Create a pull request

Now it's time to request that your quote get added to the original repository for all to see! From your myteamquotes repository in Bitbucket, do the following:

  1. Click + in the global sidebar, then click Create a pull request under Get to work.
    Bitbucket displays the request form.
  2. Complete the form. For your purposes today, you only have to add a Title.
    When you are done it will look something like this:
  3. Press Create pull request.
    The system opens your latest request on the Pull Request page of the original repository in the tutorials account. To see the list of all the pull requests against this repo, click the Pull Request tab.

After you create a pull request, you can't delete it. If you delete your fork after you make a request, the receiver can only decline your request because the repository to pull from is gone.

Step 3. Learn what happens to your pull request

You have to wait for the repository owner to accept your pull request. When the original repository owner logs into Bitbucket, that user's newsfeed shows your pull request and your fork from a few days earlier, as shown in the following image.

When the repo owner clicks on your pull request, that user can Merge or Decline it. In addition to owners, anyone with access to the repository can Approve the request, which means that person reviewed the changes in the pull request.

  1. Commits and Activity tabs: Click to view additional details about the pull request.
  2. Pull request actions: Repository owners can merge, edit, or decline. Anyone with repo access can approve.
  3. Files changed: Notice the files included in the pull request.

You've contributed to a repository!

You'll get an email when your pull request is accepted or rejected. If you want to try out other things in Bitbucket while you wait, check out how to enable an issue tracker, set up a wiki, or add user permissions.

Last modified on Feb 27, 2018

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.