Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

this is basically what worktrees do, though? except git 'knows' about all the associated branches, so you don't have to deal with pushing/pulling in order to merge xyz branch, etc.


The main issue with worktrees is that you can't have the same branch opened in multiple worktrees which makes many things harder than the ought to be. I don't really understand why we need that limitation, otherwise the tooling is good enough.


JJ workspaces don't have that limitation. They do limit you to not having the same working copy commit opened in more than one location, but that's not particularly restrictive with JJ since you're probably squashing changes from the working copy into a permanent commit anyway.


The article said that a "limitation" of worktrees is that a branch can only be checked out in one worktree at a time- however, this seems like a feature, because if you could have several worktrees each with their own overlapping sets of branches then surely that would be equivalent to many git clones?

But yes, personally, in my ignorance, I shamelessly git clone the same repo many times.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: