Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Cherry-picking through REST API

Hello :) 


I am trying to use the Bitbucket API to automatically merge some commits forward from old -> new branch. I have set up a webhook that triggers whenever a new commit is pushed to old. I would then like to take that commit and attempt to merge it forward.

I am using this route:{workspace}/{repo}/refs/branches

which takes a "target" commit hash. The target is simply a starting point though. If there are other unmerged commits before my target, the branch will contain all of them. I want the branch to only contain the commit I am specifying. Basically, I'd like to cherry-pick a commit hash into a new branch.

Is this possible at all through the REST API? Is there a possible workaround?


Thank you in advance!

1 answer

1 accepted

0 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Feb 01, 2023

Hi @Tedis Agolli and welcome to the community!

I'm afraid that it is not possible to cherry-pick using our API. We have API endpoints for creating a new commit by uploading a file and for merging pull requests, but not for cherry-picking.

The only workaround I can think of is using the git cherry-pick command in a clone of the repo and then pushing the change to the Bitbucket repo.

Kind regards,

Thanks, Theodora. That's what I ended up going with.

Like Theodora Boudale likes this

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events