Even before git has the worktree feature, you could just clone the repo again (shallowly if it’s big).