Remotes and GitHub Flow · Lesson 15 of 15
GitHub Flow: complete project
Turn an issue into a branch, commits, a pull request, review and a deployable merge.
GitHub Flow is simple: main stays deployable. For each change, create a short-lived branch, make clear commits, push and open a pull request. A PR is a place for discussion, CI and review—not merely a merge button. Merge after approval and tests, then delete the branch name.
Small clear issue
Feature branch
Commits + tests
Pull request + review
Merge and deploy
git init -q -b main echo "# Tasks" > README.md git add README.md git commit -q -m "Start project" git switch -q -c feature/add-help echo "Use: node app.js" >> README.md git commit -q -am "Document app usage" git switch -q main git merge -q --no-ff feature/add-help -m "Merge help documentation" git log --format=%s
Without write access, create a fork, push to it, and open a PR against the upstream repository. Before review, keep the PR small and explain its purpose, test method and risks. Address review with clear commits rather than hiding the discussion.
# Real GitHub CLI workflow (shown, not run in the simulator) git push -u origin feature/add-help gh pr create --fill gh pr checks --watch gh pr merge --squash --delete-branch
Quick question
When should you open a pull request?
Exercise
Run a local workflow: Base on main, Add feature on a branch, merge with --no-ff as Merge feature, then print history.
Merge feature Add feature Base
git init -q -b main echo "base" > app.txt git add app.txt git commit -q -m "Base" git log --format=%s
Learn more from
Played 0 of 2 games
Sign in to save your progress and earn XP.