Git · Senior · Question 75 of 76
Why is git worktree safer than cloning the repo twice for parallel work?
- 1Worktrees block any pushes made from the other folder
- ✓Correct answer: Worktrees share objects and refs, so stay in sync
- 3Two separate clones can't be on different branches
Explanation
Commits in one worktree are instantly visible in the others, and Git refuses to check out the same branch twice, preventing conflicting edits.