When you are ready to start a discussion about your code changes in Bitbucket Data Center and Server, it's time to create a pull request. A pull request is a dedicated forum for discussing proposed changes to a project. To create a pull request you'll need a feature branch that you've made changes to.
- Select Create pull request in the sidebar.
- Choose the source tag or branch and the destination branch. The source branch is where you made your code changes and the destination is the branch you want to merge to. The source and target branches may be located in different forks:
- Use the Diff and Commits tabs to compare the source and destination branches before creating the pull request.
- Select either Create pull request or Continue, and enter a title and description that will help people understand what your pull request is about. By default, the pull request title will contain the commit message or branch name. The description will populate with any existing commit history if no description template (Data Center only) is being used in the project or repository.
Use mentions (to notify another user), and markdown (to add formatting) in your description. If there are contributor guidelines available, have a look to make sure you're complying with the repository's owner's rules.
- Add individual reviewers or reviewer groups – users will receive a notification by email. Others who have project permissions can participate in the discussion if it interests them.
- [作成] を選択します。
You will receive email notifications when your reviewers and other participants comment on the pull request or commit changes to it.
Edit a pull request
After creating a pull request, you can modify it by clicking Edit on the pull request's page. You can edit details such as the Title, Description, and Reviewers. In particular, you can change the Destination branch for the pull request – you'll need Read permission on the branch you want to set.
Who can do this?
Available in Bitbucket Data Center 7.13 onwards
By default, pull request descriptions automatically populate with a list of relevant commit message history. The Description field is how pull request authors can set the context for a code review by adding images, links, or provide instructions for reviewers. Having a custom template for your pull request descriptions in Bitbucket Data Center will save time and help reviewers know what to expect while doing code reviews.
To create a custom description template:
- Go to Repository or Project settings > Description template.
- (Repository only) From the Project settings inheritance, select Use custom settings.
- From Template behavior, select Create a custom description template.
- Fill out the Description field with the default information or leave it empty to set an empty description value for your template.
- 変更を [保存] します。
To inherit the project level template description:
- Go to Repository settings > Description template.
- From Project settings inheritance, select Inherit from the project settings.
- 変更を [保存] します。
The default description template will automatically be populated into the description field on the Create pull request page. If you don't want to use a template for the description, you can set the Template behavior toggle to Use the commit history as the default description on the Pull request description template page.