Advanced Git & Version Control
Q92 / 100

What is "git worktree prune" and when might dangling worktree references occur?

Correct! Well done.

Incorrect.

The correct answer is A) If a linked worktree's directory is deleted manually (e.g. "rm -rf") instead of via "git worktree remove", the main repository retains stale administrative metadata referring to that now-nonexistent worktree; "git worktree prune" cleans this up

A

Correct Answer

If a linked worktree's directory is deleted manually (e.g. "rm -rf") instead of via "git worktree remove", the main repository retains stale administrative metadata referring to that now-nonexistent worktree; "git worktree prune" cleans this up

Explanation

This is a good example of how Git maintains administrative state (in ".git/worktrees/") outside of the actual checked-out directories — manual filesystem operations can leave that metadata out of sync, requiring explicit cleanup commands.

Progress
92/100