Reputation: 3451
Is it possible with git to create a pull request that wants to create a new branch on the remote repo? It seems I'm not allowed to do that. I assumed that I would be able to create the new pull request and if the owner of the repo I'm targeting accepts the PR, it will create the new branch there.
Is there some special way for this to work, or does the branch have to exist before I can make a pull request to it.
Upvotes: 4
Views: 2960
Reputation: 911
PRs are for merging code to a specific branch in target repo. That is the reason, in PR UI you are asked select source branch and destination branch. I'm not sure about your use case, but if you wish to have your code in a separate branch in target repo, you could ask the owner to create such a branch for you and go from there.
However, general practice is to fork the target repo and save all your code in your forked repo while it is under development. When you are ready to integrate, you submit a PR to original repo mostly targeting to a "dev" branch or "master" branch.
Hope this helps!
Upvotes: 6