• lobut@lemmy.ca
    link
    fedilink
    arrow-up
    6
    ·
    edit-2
    5 months ago

    I use worktrees and I wondered the same question, so far here’s what I like:

    git worktrees list can show all the worktrees, you have for this same repo (not crazy value, I know)

    git fetch applies to all your worktrees

    git stash / apply can work across worktrees, so I can stash in one and apply it to another

    You’re limited to a specific branch per worktree and many don’t like that but I typically work from a detached HEAD anyways.

    • nous@programming.dev
      link
      fedilink
      English
      arrow-up
      3
      ·
      5 months ago

      And cherry-pick commits done on different work trees without syncing them first. Or rebase or mergeworkk done on one work tree with others. Or check commit logs or diff them.