Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create a pull request in BitBucket, based on a commit hash

Some work was done against a feature branch (unfinished), and now we want a commit to be pulled into our develop branch.

Is the easiest way to create a branch off that ticket from develop (we can use Jira for this), then cherry pick which ever commits we want then commit and push them and make a pull request that way?

I was wondering if there was a way with fewer steps, and maybe just via the BitBucket UI. It allows you to make a PR fro ma branch, so why not a commit hash? We're on BitBucket v4.14.3.

like image 669
AncientSwordRage Avatar asked May 29 '26 14:05

AncientSwordRage


1 Answers

Assuming you want to introduce the single commit to the develop branch via the pull request approach, then your current method is probably the way to go. Just create a branch from develop, cherry pick, push, and then create a pull request back to develop.

If your repo in Bitbucket is setup to allow directly pushing to develop, then you have another option of pushing the cherry picked commit directly. In this case, you would pull develop, cherry pick from the other branch, then push to fast forward the remote develop branch.

like image 128
Tim Biegeleisen Avatar answered May 31 '26 06:05

Tim Biegeleisen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!