"매 source-of-truth + time machine + collaboration substrate". VCS 는 코드 변경 history 를 content-addressable 하게 저장하여 branching/merging/rollback 의 atomic 단위 제공. 매 2026 현재 Git (DVCS) 이 90%+ 시장 — Mercurial, Pijul, Jujutsu (jj) 가 niche 로 존재.
매 핵심
매 Architecture 분류
Centralized (CVCS): SVN, Perforce — single server, lock-based 또는 merge-based.
Distributed (DVCS): Git, Mercurial — 매 clone 이 full history 보유.
Modern alternatives: Pijul (patch theory), Jujutsu (Git-compatible, snapshot-based UX).
매 Git internals
Object model: blob (file), tree (directory), commit (snapshot+parent), tag (named ref).
DAG: commits 가 parent pointer 로 directed acyclic graph 형성.
Refs: .git/refs/ 의 branches/tags 가 commit hash 의 movable pointer.
Index (staging): working tree 와 commit 사이의 transition zone.
git bisect start
git bisect bad HEAD
git bisect good v2.4.0
# Git checkouts mid-commit; run test
git bisect run pnpm test:integration
# → Prints first bad commit
git bisect reset
Worktrees for parallel branches
git worktree add ../proj-hotfix hotfix/cve-2026-1234
cd ../proj-hotfix
# Independent working tree, shared .git
언제: commit message 작성, PR description, conflict resolution 설명, git history archaeology.
언제 X: force-push 결정, branch protection policy 설계 — 매 human judgment 필요.
❌ 안티패턴
Long-lived feature branches: weeks-old branch 의 merge hell 유발 → trunk-based 로 전환.
Force push to shared branch: collaborator 의 history rewrite → --force-with-lease 만 허용.
Large binaries in Git: repo size 폭발 → LFS / Artifactory 사용.