4

I have repository A and repository B in bitbucket

Can I send a pull request from rep B to A without using the fork feature? Thanks

10000000
  • 55
  • 1
  • 1
  • 5

2 Answers2

1

As far as i know you cannot sent pull request since they are 2 different repositories. what you can do is to create a patch git format-patch and add it to your second repo as pull request.

Github has its own way of doing it. https://github.com/blog/1901-managing-issues-and-pull-requests-across-repositories

CodeWizard
  • 128,036
  • 21
  • 144
  • 167
  • ok. What about this: (maybe a dumb question but here I go..) Can I for example, just start from scratch, make a fork of repository A, then is there a way to get the changes that I've made on repository B and add to the fork of repository A maybe by using some log. or conf file that is on the .git directory? – 10000000 Apr 19 '15 at 11:39
  • That a pull request. Read all about it here https://confluence.atlassian.com/display/BITBUCKET/Fork+a+Repo,+Compare+Code,+and+Create+a+Pull+Request – CodeWizard Apr 19 '15 at 11:50
  • @CodeWizard, sorry, but your URL is obsolete :( – TooroSan May 08 '18 at 13:03
-1

Maybe it is not too late for those who will find this question (like me :)).

Following article is a very detailed step-by-step guide about how to perform requested action: https://saintgimp.org/2013/01/22/merging-two-git-repositories-into-one-repository-without-losing-file-history/

If you are facing error fatal: refusing to merge unrelated histories on step git merge old_a/master, just add flag --allow-unrelated-histories to the command (like this git merge old_a/master --allow-unrelated-histories). Inspired by this q/a: https://stackoverflow.com/a/37938036/3264323

PS. This answer is not about pull request, but about how to merge two repos. Of course you could use this info to merge one repo to another one's different branch and then create pull request. ;)

TooroSan
  • 162
  • 1
  • 4
  • 11