0
0
Gitdevops~10 mins

Why worktrees enable parallel work in Git - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to create a new worktree named 'feature' from the branch 'main'.

Git
git worktree add [1] main
Drag options to blanks, or click blank then click option'
Afeature
Bmaster
Corigin
Ddev
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'master' instead of 'feature' creates a worktree with the wrong name.
Using 'origin' is incorrect because it's a remote, not a directory name.
2fill in blank
medium

Complete the command to list all existing worktrees.

Git
git worktree [1]
Drag options to blanks, or click blank then click option'
Acheck
Bstatus
Cshow
Dlist
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'status' or 'show' does not list worktrees.
Using 'check' is not a valid git worktree command.
3fill in blank
hard

Fix the error in the command to remove a worktree named 'feature'.

Git
git worktree [1] feature
Drag options to blanks, or click blank then click option'
Aremove
Bdelete
Cprune
Drm
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'prune' cleans up stale worktrees but does not target a specific one.
Using 'rm' is not a git worktree command.
4fill in blank
hard

Fill both blanks to create a new worktree named 'test' from branch 'dev' and switch to it.

Git
git worktree add [1] [2] && cd [1]
Drag options to blanks, or click blank then click option'
Atest
Bdev
Cmain
Dfeature
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'main' or 'feature' instead of 'dev' for the branch causes the wrong branch to be checked out.
Using a directory name different from the first blank in the cd command causes errors.
5fill in blank
hard

Fill all three blanks to explain how worktrees enable parallel work by creating separate directories, branches, and allowing simultaneous commits.

Git
Worktrees create separate [1], each linked to a [2], allowing [3] commits without interference.
Drag options to blanks, or click blank then click option'
Adirectories
Bbranches
Csimultaneous
Drepositories
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'repositories' instead of 'branches' is incorrect because worktrees share the same repository.
Using 'repositories' for the first blank is wrong because worktrees are directories inside one repo.