How do I split a big PR in to multiple small PRs ? basically rolling back the video film roll in time lapse mode

Viewed 128

I have raised a big git PR with say 45 test stories (we are using Java Cucumber BDD) in a single branch. Say these 45 stories belong to 3 categories like Users, Device, Bootload etc., equally like each category has 15 stories implemented. Each test story implementation happens in 3 files,

  1. feature file
  2. BDD steps file,
  3. BDD step implementation file. Each category(of test cases) will have above separately named 3 implementation files.

Our Manager wanted this big PR with 45 stories in a single branch to be split in to ideally 45 PRs, or in my idea is to raise at least 15 PRs, each PR containing implementation of 3 stories each.

So with this in mind, now I start with the pristine 'master' branch, start a new branch-CA1 (meaning development branch for CategoryA, branch 1).

Then following in the same lines, I will have

  • branches-CA2, CA3, CA4, CA5 FOR category A,

  • branches-CB1, CB2, CB3, CB4, CB5 FOR category B,

  • branches-CC1, CC2, CC3, CC4, CB5 FOR category C

Each of those branches will start from the pulling of pristine 'master' branch and CA1, CA2, CA3, CA4, CA5 will change(append one story implementation after another) the same 3 implementation files mentioned above.

Similarly so does CB1, CB2, CB3, CB4, CB5 will change(append one story implementation after another) the same 3 implementation files(names different corresponding to the Category B) mentioned above.

Similarly so does CC1, CC2, CC3, CC4, CC5 will change(append one story implementation after another) the same 3 implementation files(names different corresponding to the Category C) mentioned above.

Now would there be a problem after raising 15 smaller PRs with 3 stories each, instead of big blob of 1 PR with 45 stories. How do I think that ??

When the 1st PR of Category A, having first 3 story implementations..... until 15th PR of Category C, having the last of 43,44,45th test story implementations.

When these PRs tried to be merged in sequence after some review comments and their remediation for each PR, how well the subsequent PRs merging will end up ? Do they have innumerable no. of conflicts, as each PR is built on top of a pristine master branch even though each story implementation is atomically and individually change the 3 implementation files in sequence ?

Is there a better approach ? It is due to our PR reviewer guy wining about unable to review a big bundle of 45 stories at a time over a long time like a day instead of small PR(with 3 stories) review which may take hardly an hour or less.

0 Answers
Related