Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Merging two branches

Ritesh Keshri
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 17, 2019

I'm currently transitioning from Perforce to Bitbucket. I would like to know if bitbucket allows commit-based merge between two branches. Let me elaborate my question with Perforce example. Perforce offers the option to merge only specific change list and ignore other change lists. does bitbucket offer such a mechanism ? 

1 answer

1 accepted

0 votes
Answer accepted
Mikael Sandberg
Community Champion
November 18, 2019

Hi @Ritesh Keshri,

Welcome to the Atlassian Community.

No, Bitbucket do not allow you to select specific commits when doing a Pull Request. All commits on the source branch will be part of the merge. Git does allow you to cherry-pick, so it is possible to do. You can find more information about cherry-picking here, https://git-scm.com/docs/git-cherry-pick 

Ritesh Keshri
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 19, 2019

Thanks, @Mikael Sandberg. I assume that Bitbucket doesn't differentiate between the actions performed through bitbucket UI and command line.  An auto-merge script can be written to perform such cherry-pick merging (using git commands) and can be run on bitbucket server. 

Mikael Sandberg
Community Champion
November 19, 2019

Correct. We have repositories that are automatically merged via a Jenkins job.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events