nerdexam
Microsoft

GH-900 · Question #33

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

The correct answer is C. To experiment with new features or fixes. In GitHub flow, the primary purpose of creating a new branch is (C) to experiment with new features or fixes in isolation from the main branch. Branches allow developers to work on changes independently without affecting the stable codebase, and changes are only merged back…

Introduction to Git and GitHub

Question

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

Options

  • ATo create a backup of the main branch
  • BTo capture information about an issue
  • CTo experiment with new features or fixes
  • DTo incorporate changes from a review

How the community answered

(23 responses)
  • B
    4% (1)
  • C
    96% (22)

Explanation

In GitHub flow, the primary purpose of creating a new branch is (C) to experiment with new features or fixes in isolation from the main branch. Branches allow developers to work on changes independently without affecting the stable codebase, and changes are only merged back after review and approval. Creating a backup of main (A) is not a branching purpose - that would be a tag or fork. Capturing issue information (B) is the purpose of GitHub Issues, not branches. Incorporating review changes (D) is done via commits on an existing PR branch, not by creating a new branch.

Topics

#Git branching#GitHub flow#Feature development#Code isolation

Community Discussion

No community discussion yet for this question.

Full GH-900 Practice