I have multiple feature branches, and usually when i do a git push from my feature branch (checked out locally) , gitHub wants to merge to the master.
However, i have observed pull requests which contain commits from different feature branches all rolled into one PR. I have also seen commits from different feature branches trying to merge commits into the other, all in one PR.
None of the branches exist on the github repo yet.
How is this done ?
Pardon me if this question is too trivial, i'm new to github !
When you create a pull request, you can specify the base branch, which is the branch it's based off of and into which it will be merged. If you set the base branch of your first PR to master and you set the base branch of subsequent PRs to that of your first PR, then those subsequent PRs will merge into your first PR, and then it will merge into master.
Typically, you'd only want to do this if you had multiple related PRs, or if you had one series that built upon another. If you have the latter case, GitHub will exclude commits in the base branch (that is, the first PR's branch) from display in the latter, showing only the commits that are new in your other PR.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With