Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to clone a repository along with unmerged pull request?

Prayuja Patil
Contributor
May 15, 2018

I want to clone a repository along with unmerged pull request.

1 answer

1 accepted

0 votes
Answer accepted
Christian Glockner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 16, 2018

Hi Prayuja,

If the source branch of the pull request is in the same repository you can simply clone the repository as it will contain the branch with the changes the pull request is proposing to merge. If the source branch is in another repository (for instance a fork of the target repository), then you'll need to clone that repository (instead or in addition)

The pull request itself is metadata not stored in the repository but in Bitbucket Server's database.

Cheers,

Christian

Premier Support Engineer

Atlassian

Greg Arnott
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 17, 2019

Bitbucket promotes the methodology of personal repo-forking of a project, and upstream PRs for submissions.

For a private repo (the vast majority of cases for this kind of usage), then each fork would also be a private repo.

Code reviewing a PR becomes a tooth-pulling nightmare, especially with regards to SSH authentication. Each team member would need to add each other as a contributor combined with SSH Authentication - *for EACH and every project within the project!*. The current team I'm now part of, that would mean 25 * 75 (1875) instances that this would need to be done, instead of a simple command like:

    git fetch origin pull/1234/head
    # or
    git config --add remote.upstream.fetch '+refs/pull-requests/*/from:refs/remotes/upstream/pr/*'
    git fetch upstream

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events