Reputation: 1327
Is there a way to copy a bitbucket repo to new project, but preserve all pull requests/code reviews?
I'm aware that you can do a git clone, in which case you have a copy of code and commits. But, it seems like pull requests are gone.
I think importing a repo has the same problem (https://support.atlassian.com/bitbucket-cloud/docs/import-a-repository/). I don't think pull requests are preserved.
I'm also aware you can "move" a repository. But that would wipe out the original repo. That's not ideal since I want the original repo still around so I could refer back to it.
Am I missing something obvious? I suppose you could make a copy of the whole SQL database, but that seems a bit hacky to me. After all, I need to migrate a single repo, not everything.
Upvotes: 4
Views: 1617
Reputation: 535096
The problem is that there is really no such thing as a pull request.
A pull request is a hack, an illusion created by these clever remote hosts like GitHub and Bitbucket. It's not a Git feature, and it isn't part of the repo in any standard sense.
So when you copy the repo (e.g. by cloning), there is no "pull request" in it. You can see the branches that were created in order to request that they be merged, but you cannot see the "pull request" per se, as it is not a thing as far as Git is aware. The pull request and the code review are part of Bitbucket, not part of Git or the repo.
Upvotes: 3