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 m
In bitbucket what you can do is
git config remote.origin.fetch "+refs/heads/:refs/remotes/origin/"
and then
git fetch
after that you can checkout to the branch you want to
git checkout BRANCH_NAME
P.S: Hopefully bitbucket will sort this out https://jira.atlassian.com/browse/BCLOUD-5814
One may fetch the code from Bitbucket Server's pull requests using:
git fetch origin refs/pull-requests/$PR_NO/from:$LOCAL_BRANCH
When is not possible to checkout the pull request, a trick is that you can checkout the last commit of that pull request
git checkout <hash code of last commit>