Collaboration — GitHub Flow · PR · Code Review · Commit Conventions
Collaboration — GitHub Flow · PR · Code Review · Commit Conventions
🎯 After reading this lesson
After finishing this lesson, you will be able to confidently do the following 3 things.
- ▸✅ Standard Pull Request / Code Review workflow
- ▸✅ Writing a PR Template + Test plan
- ▸✅ Feature flags + incremental deployment
Keep the learning objectives as a checklist, and close the lesson once you can answer all of them.
GitHub Flow — The Simplest Collaboration Pattern
1. Branch from main — git checkout -b feature/awesome
2. Work + push often — commit + push immediately (backup + CI trigger)
3. Open a PR early — Draft PR — enables review in parallel while work continues
4. Discussion & revisions — comments → additional commits → re-run CI
5. Approve + merge — review OK + CI green → merge to main
6. Automatic deployment — CD automatically deploys main to production (usually within 5 minutes)
> 💡 Difference from Git Flow: no develop/release branches. Just a single main line + feature branches. Optimized for SaaS.
Pull Request 6-Step Cycle
1. Branch + commit — work on feature branch + commit + push
2. Create PR — GitHub Compare & pull request → write title and description
3. CI runs automatically — GitHub Actions runs build, tests, and linting automatically
4. Request peer review — assign Reviewers. Notifications via Slack and email as well
5. Discussion & revisions — comments → additional commits → auto-updated. Repeat until approved
6. Merge — approved + CI passed → merge to main. Branch deleted automatically
Good PR title:
- ▸❌
fix bug - ▸✅
fix(auth): Handle JWT expiration — 401 response + refresh token reissue
Good PR description (template):
6 Principles of Code Review
1. Review the code, not the person — not "this part is wrong" but "what if we did it this way?" No personal attacks
2. Ask questions — "Why this approach?" ✅ / "This is wrong" ❌. Invite discussion
3. Reason + suggestion — "NPE risk. How about adding a null check?" — problem and solution together
4. Indicate priority — [Blocking]·[Suggestion]·[Nit] — mark importance explicitly
5. Praise the good — "This part is clean!" — encourage positive feedback
6. Attach learning resources — link relevant docs and blog posts — grow together
Reviewer checklist:
- ▸[ ] Does the code match the PR description?
- ▸[ ] Are there sufficient tests?
- ▸[ ] Are names clear and meaningful?
- ▸[ ] Error handling & edge cases
- ▸[ ] Security (secrets · SQL injection · XSS)
- ▸[ ] Performance (N+1 · unnecessary computation)
Commit Conventions — Conventional Commits
Format: <type>(<scope>): <description>
Types:
Automation benefits:
- ▸
git log --grep "^feat"— view only feat commits - ▸Auto-generate CHANGELOG (
semantic-release) - ▸Automatic SemVer: feat=minor / fix=patch / BREAKING CHANGE=major
- ▸Block non-conforming PRs in CI with
commitlint
> 💡 Korean messages are fine too. The key is the type prefix and stating the reason.
🤖 Try asking AI like this
Knowing the concepts in this lesson lets you give AI specific instructions — not a vague "fix this" but a request with vocabulary — and that is where token savings begin.
- ▸"Rewrite this PR body using the '## Summary / ## Test plan / ## Risks' template"
- ▸"Give me 3 examples of effective code review comments (question-style + alternative suggestions) for this code"
Why does this reduce tokens?
Without the concepts, even after receiving an AI answer you have to ask "What does that mean?" again. Those follow-up questions eat tokens. Learn the concepts once and the conversation ends in a single exchange.