Search code examples
gitgithubgit-flow

best practices to open more than one PR


I'm working in a personal project with some new features(well-defined) and I will open PR from each feature to my reviewer.

But my reviewer will only be able to look at my PR once a week, then I will finish more than one feature until it.

I want to know from which branch I create another one after the first PR.

For example(we will only work with master and feature-branches):

I created a branch called feature-one from the master, made 4 commits on it, completed the job and pushed and opened a PR. Now for feature-two I open a new branch ... as long as the reviewer has not yet looked at my first PR, this feature-two branch I create from the master branch or from the feature-one branch that I already did PR has not yet been reviewed?

This will happen in several scenarios where PRs can be intelligent or independent features (like new controllers and layouts)


Solution

  • I presume that the PR is a request to merge into master.

    In that case, every feature should be its own individual branch, branching from the latest state of master. Just before submitting a finished feature as a PR, pull master and rebase that branch onto master.

    All other workers should behave the same way.