←back to thread

128 points nvader | 3 comments | | HN request time: 0s | 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 #
mastax ◴[] No.46193047[source]
You push branch A, then switch to branch B and start working on that. CI failed on branch A, so you stash branch B and switch back to branch A to fix it.
replies(1): >>46193415 #
1. fusslo ◴[] No.46193415[source]
thanks, that makes sense. I don't see how a worktree is more convenient in that case.

Maybe from the kind of work I do? either CI is failing because of something really simple, or something really complicated that means getting a product setup and producing debug messages. If it's a critical fix on branch A, then I'm not working on branch B. I'm testing branch A locally while CI does its thing

replies(1): >>46194791 #
2. neandrake ◴[] No.46194791[source]
Worktrees are useful particularly because they look like entirely separate projects to your IDEs or other project tooling. They are more useful on larger projects with lots of daily commits. If you just use branches then whenever you switch, in the worst case, your IDE has to blow away caches and reconstruct the project layout or build the project fresh. On large projects this takes significant time. But switching your IDE to a different project, there are now two project and build caches to switch between.
replies(1): >>46195635 #
3. fusslo ◴[] No.46195635[source]
ah interesting. our codebase is over 10gb with about 8 years of history. But, we only have 2-3 merges per week.