GH-900 ยท Working with GitHub
GitHub Flow
The lightweight branch-based workflow: create a branch, make commits, open a pull request, review, merge, delete the branch, and why main stays deployable.
Key points
- A lightweight, branch-based workflow: create a branch, commit and push changes, open a pull request, address review feedback, merge, then delete the branch. Work stays isolated from the default branch until the merge.
Source: https://docs.github.com/en/get-started/using-github/github-flow
Practice questions
What is the first step of GitHub Flow?
- Merge into the default branch
- Open a pull request
- Create a branch
- Delete the old branch
Show answer
Answer: C. Create a branch
You start by creating a branch so your work does not touch the default branch. Opening a pull request and merging come later.
Which actions are part of GitHub Flow?
- Creating a branch for the change
- Committing directly to the default branch
- Opening a pull request to request feedback
- Deleting the branch after merging
- Keeping every feature branch forever
Show answer
Answer: A. Creating a branch for the change, C. Opening a pull request to request feedback, D. Deleting the branch after merging
Branching, opening a pull request and deleting the branch after the merge are steps of the flow. Committing straight to the default branch and keeping a branch forever are not.
True or false: deleting a branch after merging also deletes the pull request and its commit history.
Show answer
Answer: False
False. The pull request and the commit history remain available after the branch is deleted.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
