Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

A proper merge commit....how to do within a PR?

David V_ Corbin July 25, 2022
How to do TRUE merge as part of a PR (meaning a new merge commit that has 2 - or more parents). Not a FF (that makes it look like work was done "on" the target branch); not a Squash (that eliminates the history)....

2 answers

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 2, 2022

Hello @David V_ Corbin ,

Thank you for reaching out to Atlassian Community.

When you click the "Merge" button in a pull request, a new panel will be displayed with an option to choose which merge strategy you'd like to use : 

Screen Shot 2022-08-02 at 18.01.19.png

The currently available option are Merge commit, squad, or Fast forward. Accordingly to your description, the option that would create a new commit with two parents would be Merge commit.

You can also set the default merge strategy in a given repository by going to Repository Settings > Merge Strategies.

Hope that helps! Let me know in case you have any questions.

Thank you, @David V_ Corbin .

Kind regards,

Patrik S

0 votes
Ulrich Kuhnhardt _IzymesCo_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
July 25, 2022

Hello David,

to override the merge-commit message Bitbucket creates you can trigger a PR merge via the Bitbucket cloud rest api https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-pullrequests-pull-request-id-merge-post and define the merge message via the 'message' request parameter.

Hope that helps

Ulrich

// Izymes

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events