Bitzu

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

Single choice

What is the first step of GitHub Flow?

  1. Merge into the default branch
  2. Open a pull request
  3. Create a branch
  4. 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.

Select all that apply

Which actions are part of GitHub Flow?

  1. Creating a branch for the change
  2. Committing directly to the default branch
  3. Opening a pull request to request feedback
  4. Deleting the branch after merging
  5. 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

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.

Download on the App StoreGet it on Google Play

More GH-900 topics in this module