Git & GitHub
/Intermediate
GitHub Flow
Definition
A lightweight, branch-based workflow that supports teams and projects where deployments are made regularly. It centers entirely around Pull Requests.
Explain Like I'm New
The modern standard. There is only ONE permanent branch: `main`. Everything on `main` MUST be deployable right now. To work, you branch off `main`, commit, open a PR, get it approved, merge it, and deploy it immediately.
Real World Example
How almost every modern startup works. The process is so fast that a developer can write code at 10:00 AM, and it is live on the internet serving millions of customers by 11:30 AM.
Common Use Cases
- •Continuous Deployment
- •Web Applications
Terminal Output
bash / terminal
/*
The 6 Steps of GitHub Flow:
1. Create a branch (from main)
2. Add commits
3. Open a Pull Request
4. Discuss and review the code
5. Merge the PR
6. Deploy immediately!
*/
Interview Questions
basic
- In GitHub Flow, how many long-running branches are there?
intermediate
- What is the golden rule of the `main` branch in GitHub flow?