0

I have copied code and commit history from one repository to another

git remote set-url origin ssh://git@mycompany.com:7999/new-project/repository.git
git push -f origin

for long-living branches: develop and master.

However, our PCI requirements require also pull requests (merged) to be copied as well. How this can be done?

FlyingFoX
  • 3,379
  • 3
  • 32
  • 49
dzieciou
  • 4,049
  • 8
  • 41
  • 85

1 Answers1

0

If you still have the branches that correspond to your pull requests, then you can use

git push --all origin

to push all local branches and tags to your remote repository.

See also this answer.

FlyingFoX
  • 3,379
  • 3
  • 32
  • 49
  • Will pushing branches push all pull requests together with comments? – dzieciou Jan 25 '18 at 17:29
  • Do you store your comments in git? – FlyingFoX Jan 25 '18 at 17:31
  • We use BitBucket to leave comments in pull requests. I don't know if comments are a part of git data model, or only pull requests are and comments is feature specific to vendor implementation of git. – dzieciou Jan 25 '18 at 17:39
  • 1
    Then you have to look into bitbucket to export your comment data. They are not part of git. Your pull requests may be mirrored by branches in git, but they are themselves not part of git, only the branches are part of git. – FlyingFoX Jan 26 '18 at 08:14