Three developers, one main, a Friday deploy. Without rules someone breaks production. With a workflow every change goes through a branch and a pull request, and a second pair of eyes sees it before users do.
Course
Git Basics Course · Module 5 of 7 · Stage 2 "In a team"
Learn
GitHub Flow, Git Flow, pull requests and code review with the gh CLI
How
3 lessons on my-plugin on GitHub: your main is one commit behind and a teammate has opened PR #41
From task to production
flowchart LR
T(["Task"]) --> B["git switch -c<br/>feature/…"]
B --> C["commits"]
C --> P["gh pr create"]
P --> R{"Code review"}
R -- "changes requested" --> C
R -- "approved" --> M["merge to main"]
M --> D(["deploy"])
classDef step fill:#fff7ed,stroke:#EE5133,color:#7c2d12
classDef gate fill:#ecfdf5,stroke:#10b981,color:#065f46
classDef edge fill:#EE5133,stroke:#9a2a14,color:#ffffff
class B,C,P,M step
class R gate
class T,D edge
Which model fits your project
GitHub Flow
Git Flow
Fits
sites, SaaS, continuous deploy
plugins/themes with versions, planned releases
Permanent branches
main
main + develop
Path to production
merge → deploy
feature → develop → release → main
Cost
minimal
more merges, more discipline
You'll be able to answer
Describe GitHub Flow.
Why must main always be deployable?
Which model would you pick for an online store with frequent releases, and why?