"매 collaboration 의 traffic rule". 매 team size + CI maturity + release rhythm 의 따라 다름. 매 modern: Trunk-Based + Feature Flag 의 dominant. 매 long-lived branch 의 evil — 매 merge hell 의 source.
📖 핵심
매 4 main strategy
1. Feature Branch Workflow (basic)
main 의 stable.
매 feature 의 short-lived branch.
매 PR + review → squash merge.
✅ 매 entry-level. ✅ 매 small team.
❌ 매 long branch → 매 conflict.
2. GitHub Flow
main only + 매 feature branch.
매 deploy 의 매 merge 후.
매 simple + 매 CI 의 strict.
✅ 매 SaaS 의 continuous deploy.
3. GitLab Flow
main + staging + production.
매 environment 별 promotion.
✅ 매 staged release.
4. Git Flow (Vincent Driessen 2010)
main, develop, feature/*, release/*, hotfix/*.
✅ 매 versioned release.
❌ 매 heavy. 매 SaaS 의 outdated (Driessen 도 2020 의 retract).
5. Trunk-Based Development (Google, Meta, Netflix)
# 매 start
git checkout main && git pull
git checkout -b feature/PROJ-123-user-auth
# 매 work
git add . && git commit -m "feat: add login form"
git push -u origin feature/PROJ-123-user-auth
# 매 PR (gh CLI)
gh pr create --title "feat: add user authentication" --body "..."# 매 merge 후
git checkout main && git pull
git branch -d feature/PROJ-123-user-auth
Trunk-Based (rapid)
# 매 small change directly
git checkout main && git pull
git checkout -b fix/typo
# 매 30 min change
git commit -am "fix: typo in README"
git push -u origin fix/typo
gh pr create --fill
# 매 squash merge in < 1 hour
Feature flag (TBD enabler)
import{useFlag}from'@growthbook/sdk';functionCheckout() {constnewCheckout=useFlag('new-checkout-flow');returnnewCheckout?<NewCheckout/>:<OldCheckout/>;}// 매 incomplete new path 의 prod 의 deploy. 매 flag ON 만 의 user 의 see.
Conventional Commits + auto changelog
# 매 standard-version (auto semver + changelog)
npx standard-version
# 매 commitlint configecho"module.exports = { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js
Branch protection (GitHub)
# 매 GitHub branch protectionprotection:required_pull_request_reviews:required_approving_review_count:1required_status_checks:strict:truecontexts:[ci/build, ci/test, ci/lint]enforce_admins:truerequired_linear_history:trueallow_force_pushes:false
Stack-based PR (Graphite)
# 매 stack 의 create
gt create -m "feat: add API endpoint"
gt create -m "feat: add UI consumer"
gt create -m "feat: add tests"# 매 base branch 의 update → 매 모든 stack 의 rebase
gt sync
# 매 stack 의 submit
gt submit
Daily rebase (avoid conflict hell)
git checkout feature/long-running
git fetch origin
git rebase origin/main
# 매 conflict 의 매 small batch 의 resolve.
Hotfix (branch from main)
git checkout main && git pull
git checkout -b hotfix/critical-security
# 매 fix
git commit -am "fix: patch SSRF vulnerability"
git push -u origin hotfix/critical-security
gh pr create --label urgent
# 매 fast-track merge → 매 immediate deploy
🤔 결정 기준
상황
Strategy
Solo / hackathon
Direct to main
2-5 dev
Feature Branch
SaaS continuous
GitHub Flow + feature flag
Mobile (versioned)
Git Flow or GitLab Flow
Large org
Trunk-Based + feature flag
Big feature
Stack-based PR
Open source
Feature Branch + maintainer review
기본값: Trunk-Based with Feature Flag (modern). 매 Git Flow 의 avoid (대부분 의 case).