logoalt Hacker News

rafaelmntoday at 10:15 AM2 repliesview on HN

So how is this different from git worktrees exactly ?


Replies

weinzierltoday at 11:49 AM

In git you can have only one worktree per branch. For example, if you have a worktree on main you cannot have another one on main.

I personally find this annoying. I usually like to keep one pristine and always current working copy of main (and develop if applicable) around for search and other analysis tasks[1]. Worktrees would be ideal and efficient but due to the mentioned restriction I have to either waste space for a separate clone or do some ugly workarounds to keep the worktree on the branch while not keeping it on the branch.

jujutsu workspace are much nicer in that regard.

[1] I know there are tons of ways search and analyze in git but over the years I found a pristine working copy to be the most versatile solution.

show 4 replies
rk06today at 10:38 AM

there is no difference as jj is only a frontend to git.

author me tions that git cli require multiple steps when there are unstaged changes.

I don't know if git has one liner cli command for it as i myself use gitextn to create worktrees

show 2 replies