GITHUB-FOUNDATIONS practice question 13 of 15

What is the primary purpose of creating a new branch in the GitHub flow?

Full set: 75 questions
Answer options
A: To create a backup of the main branch
B: To capture information about an issue
C: To experiment with new features or fixes Correct answer
D: To incorporate changes from a review
Correct Answer:
C. To experiment with new features or fixes
Explanation

Within the GitHub flow, the first step after opening an issue is to “create a branch.” GitHub’s official documentation states that a branch is made so you can “safely experiment with changes, work on new features, or fix bugs without affecting the main branch.” The branch isolates the work until it is merged back through a pull request, ensuring the production-ready main branch remains stable. Therefore, the core purpose of making a new branch is to allow experimentation with new features or fixes in isolation.

Why Incorrect

A. Branches are not backups; Git already tracks full history of every commit on all branches.
B. Issue information is tracked in GitHub Issues, not by creating a code branch.
D. Reviews happen after the branch exists; the branch isn’t created to incorporate review changes but to contain work before the review.

References

1. GitHub Docs – “GitHub flow,” section “Create a branch,” para. 1-2 (https://docs.github.com/en/get-started/quickstart/github-flow).

2. GitHub Guides – “Understanding the GitHub flow,” Step 1 (https://guides.github.com/introduction/flow/).

3. Chacon, S., Straub, B. “Pro Git,” 2nd ed., Apress, 2014, Ch. 3.2 (“Branching and Merging”) – explains branches as isolated experimentation areas (ISBN 978-1-4842-0076-6).

Scroll to Top