Lesson 3: Team Git — Semantic Commits, PRs, and Branch Protection
A Git history like: `fix`, `fix2`, `final`, `final-final` — that's not Git. Git is a tool that documents your decision history. When history is readable, debugging, onboarding, and rollbacks become 2 minutes instead of 2 hours.
A semantic commit is like a good filename — `project-v2-FINAL-use-this-one.docx` helps nobody. `feat(auth): add login with Google` — everyone knows what it is.
- semantic commit
- A commit format that describes the type of change (feat/fix/docs...) and scope of impact (auth/db/ui...) before the description.
- branch protection
- GitHub settings that prevent direct push to `main` — requiring a PR, review, and green CI before merge.
- trunk-based development
- A branching strategy where feature branches are short-lived (less than a day) and merged to `main` frequently — reducing merge conflicts.