Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Checkout bitbucket pull requests locally

Tags:

bitbucket

I found this gist, showing how to check out a pull request locally from GitHub.

I'm using bitbucket and I'm looking for a similar function.

Can you help me? Thank you

like image 469
moylop260 Avatar asked Sep 22 '14 05:09

moylop260


People also ask

How do I checkout from Bitbucket?

The Bitbucket interface gives you the basic command for checking out a branch. From the repository's Branches page, click the branch you want to checkout. Press the Check out button to display the appropriate check out command. Copy the command (or choose Check out in Sourcetree if you'd rather use Sourcetree).

How do I withdraw a pull request in Bitbucket?

Declining a pull request can't be undone. Once you decline a pull request, you'll have to open a new pull request request to review code for the same branch.


1 Answers

One may fetch the code from Bitbucket Server's pull requests using:

git fetch origin refs/pull-requests/$PR_NO/from:$LOCAL_BRANCH 
like image 75
Ducaz035 Avatar answered Nov 14 '22 01:11

Ducaz035