Recall & Review
beginner
What is a feature branch in Git?
A feature branch is a separate branch created from the main branch to develop a new feature independently without affecting the main code.
Click to reveal answer
beginner
Why use a feature branch workflow?
It helps keep the main branch stable by isolating new features until they are fully tested and ready to merge.
Click to reveal answer
beginner
What is the typical first step to start working on a feature branch?
Create a new branch from the main branch using:
git checkout -b feature-branch-nameClick to reveal answer
beginner
How do you merge a feature branch back into the main branch?
First switch to the main branch with
git checkout main, then merge using git merge feature-branch-name.Click to reveal answer
intermediate
What should you do before merging your feature branch?
Make sure your feature branch is up to date with the main branch and all tests pass to avoid conflicts and errors.
Click to reveal answer
What command creates a new feature branch and switches to it?
✗ Incorrect
The command 'git checkout -b feature-branch' creates and switches to the new branch in one step.
Why should you keep feature branches separate from the main branch?
✗ Incorrect
Separating feature branches keeps the main branch stable and safe from unfinished or buggy code.
What is the correct order to merge a feature branch back into main?
✗ Incorrect
You must be on the main branch to merge the feature branch into it.
What should you do if your feature branch is behind the main branch?
✗ Incorrect
Updating your feature branch helps avoid conflicts when merging back to main.
Which of these is NOT a benefit of using feature branch workflow?
✗ Incorrect
Feature branches help organize work but do not automatically fix bugs.
Explain the steps to create, work on, and merge a feature branch in Git.
Think about the commands and order you use in Git.
You got /6 concepts.
Why is the feature branch workflow important for team projects?
Consider how teams avoid conflicts and bugs.
You got /4 concepts.