Workflow
Feature branch workflow
One branch per unit of work, merged back through review.
Best for: Most teams and projects of any size.
How it works
- 1
Branch from main
Create a branch for the feature.
git switch -c feat/search - 2
Commit focused work
Keep commits small and related.
- 3
Open a PR
Push and open a pull request for review.
- 4
Merge back
Merge after approval and delete the branch.
Advantages
- Isolates work in progress
- Enables review before merge
- Keeps main stable
Tradeoffs
- Long-lived branches drift from main
- Requires discipline to keep branches short