• Kissaki@programming.dev
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    11 days ago

    Worktrees share the data stored in the .git folder. This saves storage (particularly on larger repos, and if you don’t fetch/clone only partial history), and could allow some other workflows or safeguards (backing up just one instead of multiple, centralized local state instead of spread across different workspaces). It also means it could share repo-local git settings - like remotes, local not checked-in ignores, etc. (I assume).

    • nous@programming.dev
      link
      fedilink
      English
      arrow-up
      4
      arrow-down
      1
      ·
      11 days ago

      It also lets you checkout, cherry-pick, rebase or merge work on other branches without needing to sync between the local clones.