Git · Senior · Question 75 of 76

Why is git worktree safer than cloning the repo twice for parallel work?

Explanation

Commits in one worktree are instantly visible in the others, and Git refuses to check out the same branch twice, preventing conflicting edits.

Further reading

Problem with a question

Git · Senior · question 75

Test yourself

Take the Git · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz