How I Use Git Worktrees - Alex Kladov - eviltoast
  • zygo_histo_morpheus@programming.dev
    link
    fedilink
    arrow-up
    4
    ·
    3 months ago

    The different worktrees share the same .git state. The article has an example where the author uses one tree for writing code and one for fuzzing it. If they used multiple clones they’d have to push from the writing directory and pull from the fuzzing directory to get new commits to fuzz but with worktrees this state synchronization between different git directories happens automatically.