Trunk-based development uses a single main branch with short-lived feature branches.
Getting Started
What is Git?
Branching & Merging
Branches & Merging
Tags & Releases
Git Tags
Submodules & Subtree
Git Submodules
GitHub Actions
GitHub Actions CI/CD
Git Worktrees
Git Worktrees
Git LFS
Git LFS (Large Files)
Git
Beginner
FREE
Trunk-Based Development
Lesson 2 of 17
Beginner
Interactive
Syntax
GIT
main ← single source of truth
feature/short-lived (hours/days)
feature/another (hours/days)
Trunk-Based Development
BASH
# Short-lived branches git checkout -b fix/header-bug # Make changes, commit frequently git add . git commit -m "Fix header alignment" # Push and create PR immediately git push origin fix/header-bug # After merge, delete branch git branch -d fix/header-bug git push origin --delete fix/header-bug # Keep main always deployable