Recall & Review
beginner
What is a Git worktree?
A Git worktree is an additional working directory linked to the same Git repository. It lets you work on multiple branches at the same time without switching branches in one folder.
Click to reveal answer
beginner
Which command lists all Git worktrees?
The command
git worktree list shows all the worktrees connected to the repository, including their paths and the branches checked out.Click to reveal answer
intermediate
What information does
git worktree list display?It shows the path of each worktree, the branch or commit checked out there, and if the worktree is locked or not.
Click to reveal answer
intermediate
How can you identify the main worktree in the list?
The main worktree is usually the one with the repository root path and no special lock status. It is the original working directory of the repo.
Click to reveal answer
beginner
Why use multiple worktrees instead of branches in one folder?
Multiple worktrees let you work on different branches at the same time without switching or losing changes. It’s like having multiple copies of your project linked to the same history.Click to reveal answer
Which command shows all Git worktrees?
✗ Incorrect
The command
git worktree list lists all worktrees connected to the repository.What does a Git worktree allow you to do?
✗ Incorrect
A Git worktree lets you have multiple working directories for different branches simultaneously.
In the output of
git worktree list, what does the path represent?✗ Incorrect
The path shows where the worktree folder is located on your computer.
How do you know which worktree is the main one?
✗ Incorrect
The main worktree is the original repo folder, usually unlocked and at the root path.
What happens if you delete a worktree folder without removing it from Git?
✗ Incorrect
Deleting a worktree folder without telling Git can cause confusion and errors.
Explain what a Git worktree is and why you might use multiple worktrees.
Think about having multiple project folders linked to the same Git history.
You got /3 concepts.
Describe how to list all worktrees in a Git repository and what information you get from the list.
Focus on the command and the details it shows.
You got /4 concepts.