Recall & Review
beginner
What is a tracking branch in Git?
A tracking branch is a local branch that is linked to a remote branch. It helps you keep your local branch updated with changes from the remote branch.
Click to reveal answer
beginner
How do you create a local branch that tracks a remote branch?
You can create a tracking branch using:
git checkout -b local_branch_name origin/remote_branch_name or simply git checkout remote_branch_name if it exists remotely.Click to reveal answer
intermediate
What command shows the tracking branches and their status?
Use
git branch -vv to see local branches, their tracking branches, and if they are ahead or behind.Click to reveal answer
beginner
Why are tracking branches useful in teamwork?
Tracking branches help you easily fetch and merge changes from teammates by linking your local work to the remote branch they update.
Click to reveal answer
intermediate
How do you change the upstream branch a local branch tracks?
Use
git branch --set-upstream-to=origin/branch_name to change the remote branch your local branch tracks.Click to reveal answer
What does a tracking branch in Git do?
✗ Incorrect
A tracking branch connects your local branch to a remote branch so you can easily fetch and merge updates.
Which command shows local branches with their tracking info?
✗ Incorrect
git branch -vv lists branches with their tracking branches and status.How do you set a local branch to track a remote branch?
✗ Incorrect
The
--set-upstream-to option links your local branch to a remote branch.What happens when you run
git checkout remote_branch_name if the branch exists remotely but not locally?✗ Incorrect
Git creates a local branch that tracks the remote branch automatically.
Why is it helpful to have tracking branches in a team project?
✗ Incorrect
Tracking branches make it easy to fetch and merge teammates' updates.
Explain what a tracking branch is and how it helps in managing code with a remote repository.
Think about how your local work stays updated with others' work.
You got /3 concepts.
Describe the steps and commands to create a local branch that tracks a remote branch and how to check its status.
Focus on commands that connect and show tracking info.
You got /3 concepts.