Roadmap › Clean Code, Testing & Best Practices › Module: Team Practices
Lessons in this course (12)
10. Git workflow and pull requests
Basic★ Must knowLesson 10 of 12
bash
git switch -c feature/1234-export-csv
git add -p # stage hunks deliberately
git commit -m "Add CSV exporter for monthly report (#1234)"
git fetch origin && git rebase origin/main
git push -u origin feature/1234-export-csv
# open PR → CI runs → review → squash merge- Branching models: trunk-based (short-lived branches, feature flags — common with CI/CD) vs GitFlow (develop/release/hotfix branches — heavier).
mergekeeps history with a merge commit;rebaserewrites your commits on top of the target for a linear history (never rebase shared branches).- Good PRs: small (< ~400 lines), one purpose, description with why + how to test, screenshots for UI.
- Resolve conflicts locally, re-run tests.