Why can't you create PR chunks without the build failing?
Usually, I strive for "vertical slices". That means that, sometimes, a PR just contains "useless" code in isolation, but that makes sense as I keep merging them (stacked diffs). My flow is usually:
1. Does this code have tests? What's the minimum chunk I need to write tests for it?
2. Write tests and the smallest refactor I can think of (it may be to create one function, p.e.)
3. Commit
4. Return to 1. until the full refactor is done
5. Throw 3-10 stacked diffs that can be merged with the build passing.
Usually, I strive for "vertical slices". That means that, sometimes, a PR just contains "useless" code in isolation, but that makes sense as I keep merging them (stacked diffs). My flow is usually:
1. Does this code have tests? What's the minimum chunk I need to write tests for it?
2. Write tests and the smallest refactor I can think of (it may be to create one function, p.e.)
3. Commit
4. Return to 1. until the full refactor is done
5. Throw 3-10 stacked diffs that can be merged with the build passing.
EDIT: formatting