Like many of you I also knew what git worktrees were but always found them clunky because you mentally had to manage worktrees AND branches at the same time. That's why I didn't bother using them.
A couple of weeks ago I discovered Worktrunk. That's when my whole workflow flipped 180 degrees: I now always use worktrees, love it, will never go back. Worktrunk was the missing piece for me. Very recommended.
hyfgfh [3 hidden]5 mins ago
Sorry git worktrees are a waste of time
Just keep multiple copies of the repo
brabel [3 hidden]5 mins ago
As the author, I have been using worktrees due to AI agents. And I love Magit but didn’t know it handles git worktrees so well! Thanks for letting me know, will start using magit to manage my worktrees immediately.
BoingBoomTschak [3 hidden]5 mins ago
One thing I've desperately wanted from git worktrees is to use reflinking in some way to lower the cost of copies.
Worktrees are a must if you work with monorepos or just multiple branches in general. Lack of conventions (or rather the braindead defaults) and having to explicitly type out everything is what hinders adoption the most.
I've solved this by running thin bash script wrappers that keep the workflow SVN-like with a root directory that contains per-branch directories and a hidden bare repo).
black_knight [3 hidden]5 mins ago
I think my layout is similar to yours. What do your scripts do?
My branches end up in a tree structure (no shit!), and I rebase and merge up stream as changes land. I guess it could be more automated, but the only tedious part is remembering to remove old worktrees and prune the old branches
zrg [3 hidden]5 mins ago
I'm currently very much on the jujutsu train as the author also mentioned, i do recommend y'all give it a try
A couple of weeks ago I discovered Worktrunk. That's when my whole workflow flipped 180 degrees: I now always use worktrees, love it, will never go back. Worktrunk was the missing piece for me. Very recommended.
I just found https://github.com/josharian/git-cow-worktree that doesn't inspire confidence.
I've solved this by running thin bash script wrappers that keep the workflow SVN-like with a root directory that contains per-branch directories and a hidden bare repo).
My branches end up in a tree structure (no shit!), and I rebase and merge up stream as changes land. I guess it could be more automated, but the only tedious part is remembering to remove old worktrees and prune the old branches