Home > other >  Change the target branch of an existing pull request to another fork
Change the target branch of an existing pull request to another fork

Time:12-22

I forked a repository A.. say B I created a pull request from branch B.branch1 TO B.master The pull request got some review comments.. I resolve them and so on.. I now want to change the base from B.master to A.master(parent repo) How can I do this in case of an existing PR? Since I am not seeing the option to change the base branch to another repo.. I know I can create a new pull request but that would lose all the review conversation.

enter image description here

CodePudding user response:

A pull request is an entity that is tied to the repository it was created in. Other repositories (even if forked from the original repository) may have other rules regarding pull requests, code reviews or repository access in general. The developers giving you a code review in fork A might even not be able to do so in fork B.

Therefore you can not move your pull request to another repository.

I suggest you close your current pull request and open a new one. You can link to the old PR and explain the situation so people can still see the code review conversation that was going on in the original PR.

  • Related