BENEDICT NEO梁耀恩

splitting PRs

December 5, 2025


this time i learned how to split up my PRs. i do all the work for a feature in one branch, then selectively cherry pick into new individual branches. i publish all these branches as PRs, and in the main one document how each individual smaller unit is related. each of those individual units should have one purpose. even better practice is each commit should have one concern.

MEGA_BRANCH  ← where all the work is
   │
   ├─ cherry-pick → PR A
   ├─ cherry-pick → PR B
   └─ cherry-pick → PR C

claude code is useful for that. while the three other PRs are reviewed, you might need to make some changes. you can opt to merge them back into the main PR, or you continuously iterate in that one split PR. be sure when you split them they are self-contained, so if you're iterating on the backend, it works independently.

i'm still learning efficient ways to operate. this was literally the first time i worked on a shared codebase that requires good coding practices, outside of a hackathon which has no bar at all.