Recall & Review
beginner
What is a branch in Git?
A branch in Git is a pointer to a specific commit. It helps you keep track of different lines of work in your project.
Click to reveal answer
beginner
How does a branch pointer work in Git?
A branch pointer moves forward automatically when you make new commits, always pointing to the latest commit on that branch.
Click to reveal answer
beginner
Why use branches in Git?
Branches let you work on new features or fixes separately without changing the main code. This keeps work organized and safe.Click to reveal answer
beginner
What happens when you switch branches in Git?
Switching branches changes your working files to match the commit the branch points to, letting you work on different versions easily.
Click to reveal answer
beginner
How can you see all branches in a Git repository?
Use the command
git branch to list all branches and see which one you are currently on.Click to reveal answer
What does a Git branch point to?
✗ Incorrect
A Git branch is a pointer to a specific commit in the repository.
What happens to a branch pointer when you make a new commit on that branch?
✗ Incorrect
The branch pointer moves forward to the new commit automatically.
Which command shows all branches in your Git repository?
✗ Incorrect
The command
git branch lists all branches.Why do developers use branches in Git?
✗ Incorrect
Branches allow working on new features or fixes without affecting the main code.
What does switching branches do to your working files?
✗ Incorrect
Switching branches updates your files to match the commit the branch points to.
Explain what a branch is in Git and how it relates to commits.
Think of a branch as a label that moves along your project history.
You got /4 concepts.
Describe why using branches is helpful when working on a project.
Imagine working on different tasks without mixing them up.
You got /4 concepts.