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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Test a pull request from a private repo before merging

I am currently working on a project hosted on Bitbucket. My client is having another developer work on some other features in parallel so I gave that developer read access to my repo and he forked it. I do not have access to his fork.


He recently finished a feature and made a pull request to my master. Is there a way, prior to approving and merging his PR into my master, for me to actually pull the code in his PR down to test it if I don't have access to his repo?

1 answer

1 accepted

0 votes
Answer accepted

Hello @Brent Kelly,

Thanks for reaching out.

You can't clone that fork repo if it is private but you can pull a patch for your PR, then apply it to your repository – this way you'll reconstruct the changes suggested in that PR locally.

Here's the API endpoint to get the patch. If you need this just once and prefer to use your session authentication, you can call the API this way:!api/2.0/... 

If you plan to use it on a regular basis or in a script, you'll need to call our API domain and use one of the supported authentication methods:

You can then apply a patch using git apply command, see relevant documentation for Git.

Hope this helps. Let me know if you have any questions.


That looks like it will work. I've already merged the pull request as there was a bit of a time crunch, but I'll try this when I get another one.


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,793 views 10 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you