Git Branch PR decision - globe-and-citizen/cnc-portal GitHub Wiki
โ Should this change be in a separate branch and PR?
Ask yourself the following questions:
-
Is this change unrelated to the current work in the branch? โ โ Yes โ Put it in a separate branch and PR โ โ No โ Go to next question
-
Is the change tightly coupled with the current work? โ โ Yes โ Go to next question โ โ No โ Put it in a separate branch and PR
-
Is this change likely to be needed by other teammates soon (e.g., shared component, helper, refactor)? โ โ Yes โ Put it in a separate branch and PR, and prioritize its delivery โ โ No โ You can include it in the current PR, but clearly explain the dependency
โก Quick Rules of Thumb
- ๐ง Bug fix that's unrelated โ Separate PR
- ๐ฑ New feature โ Always a separate PR
- ๐งน General-purpose refactor โ Separate PR
- โป๏ธ Refactor required for the feature โ Can be in same PR
- ๐ฏ Change is useful to others immediately โ Separate PR, deliver it first
- ๐ช Small polish tied to main feature โ Same PR
๐ Why this matters
- โ Keeps PRs focused, smaller, easier to review
- ๐งช Enables independent testing and CI feedback
- ๐ Allows other team members to reuse work sooner
- ๐งผ Maintains a clean and understandable Git history
- ๐ Makes releases and hotfixes safer and faster