Is there a way to pull/fetch pull request on to my local system?
Currently, I have tried to read a lot of forums and founds some solutions none of which works
git fetch origin refs/pull-requests/<pull request number>/from:<new local branch name>
git fetch origin pull/3/head
Just wanted to know if it possible to fetch the pull request to the local machine for testing on bitbucket.org, or is there a proper workflow in place to archive this requirement?
Hi Atish,
Welcome to Atlassian community :)
Are you referring to something like described in the link below?
Hello @lumoura,
Thanks for the quick reply I have tried that, seems its a very old answer and does not work anymore, moreover, the UI has changed as well.
When I tried to execute the step provided in the URL it gave me permission issues, it seems you need have access to the forked repository as well (READ ACCESS) to fetch down the changes.
Regards,
Atish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Atish Goswami many thanks for your reply. I'm coming to the same conclusion.
There seems to be so many conflicting posts around and it's hard to distinguish between people talking about bitbucket cloud and bitbucket server.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Adam I am currently using a hack for now using bitbucket's API and fetching the pull request as a patch and applying to local:
curl -u <username>:<password> https://api.bitbucket.org/2.0/repositories/<username>/<reponame>/pullrequests/<pull_request_id>/diff -L | git apply -
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Atish GoswamiThanks for your hack! It works!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.