GitHub Flow
GitHub Flow is a lightweight, PR-centric workflow designed for continuous delivery. There is only one rule: main must always be deployable. Feature branches are short-lived and merge directly to main, triggering immediate deployment.
01.The Six Steps of GitHub Flow
Step 1: Branch — create a descriptive branch from main. Step 2: Commit — make small, clear commits as you build. Step 3: Pull Request — open a PR early (even as draft) to start discussion. Step 4: Review — teammates review, discuss, suggest changes. Step 5: Deploy — deploy the PR branch to staging to verify in production-like environment. Step 6: Merge — once approved, merge to main and deploy to production immediately.
02.GitHub Flow vs GitFlow Comparison
GitHub Flow: one permanent branch (main), feature branches only, deploy from main continuously. Simple, fast, great for web apps. GitFlow: two permanent branches (main + develop), five branch types, deploy from release branches on a schedule. Complex, slower, great for versioned software. Choose based on your deployment model: continuous = GitHub Flow, scheduled = GitFlow.
Commands
What is the single most important rule of GitHub Flow?