←back to thread

128 points nvader | 3 comments | | HN request time: 0.653s | source
Show context
fusslo ◴[] No.46192929[source]
I don't understand the workflow that makes JJ more useful than git. I dont think I've even had the idea of having multiple worktrees going at once. What is the use case? The author mentions being blocked by CI flow. Don't you have CI running on gitlab or github? just commit and push the branch and run CI. The author mentions stashing the changes, but like.. if you're running against CI, isn't it in a state that is commitworthy? I don't see how creating a worktree in a new folder and opening a new editor is more convenient than creating a branch at a certain commit.

I can understand if you need to run a CI or unit tests locally. Is that it?

I am not attacking JJ, I genuinely can't understand its value in my current workflow.

replies(9): >>46193047 #>>46193118 #>>46194204 #>>46194494 #>>46194612 #>>46194856 #>>46195079 #>>46200711 #>>46202517 #
steveklabnik ◴[] No.46194494[source]
I wrote a very popular tutorial for jj, and I didn't use workspaces until a few weeks ago. They're useful for the same reasons git worktrees are: most recently, people use them for doing work with multiple AI agents in parallel, but historically, I've seen people use them for things like "this project's build takes 30 minutes so I want to work on something else while I wait for that".

> I don't see how creating a worktree in a new folder and opening a new editor is more convenient than creating a branch at a certain commit.

Worktrees are about being able to work on multiple branches at the same time, fundamentally. When you want to be doing something on one branch and something else on another branch simultaneously.

That does mean it's, IMHO, a fairly niche feature.

replies(1): >>46194689 #
1. jfb ◴[] No.46194689[source]
I think it shouldn't be, and the poor affordances in git have hidden this for a long time.
replies(1): >>46194784 #
2. steveklabnik ◴[] No.46194784[source]
What kinds of things do you use it for? I'm always open to learning about newer and better ways to work.
replies(1): >>46195176 #
3. jfb ◴[] No.46195176[source]
I keep my agent workflows distinct; we have (for historic reasons) a lot of non-git controlled context that differs between branches, and moving all that around on checkouts is untenable. I use this tool:

https://github.com/tdhopper/wt

with some custom shell aliases to make it easier.