• lobut@lemmy.ca
    link
    fedilink
    arrow-up
    16
    ·
    20 days ago

    Yeah, I didn’t see the use for them until I got further into it over just cloning. Your worktree “folders” share the same git history and stuff. So you can stash in one and apply in the other. If you do a fetch in one, it fetches for all of them.

    Whether it’s worth it for others to learn these just for those things is hard to say. I picked it up simply because I was bored and wanted to pick up a new “thing”.

    • Ephera@lemmy.ml
      link
      fedilink
      English
      arrow-up
      4
      ·
      20 days ago

      Yeah, I think their saving grace is that they really aren’t that hard to use. I don’t use them often enough to remember the commands by heart, but it doesn’t take me long to figure it out anew each time. Typically not as long as cloning the repo anew, at least.