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

I kind of don't get this comment. Isn't the `jj` default behaviour effectively `git commit --all`? There's no staging area -- and I personally find `git add` or `git add -p` a better UI than `jj commit -i`.

Meanwhile, there are git tools that solve the above three problems. My organisation uses `git-spice` (https://abhinav.github.io/git-spice/) which tightly integrates with Github to give you stacked PRs, editing of branches and management of your stacks in Github.

I've been trying jj for a while now because Steve Klabnik heavily recommended it, and so far it hasn't clicked in as nicely as my existing git setup.





I think everyone uses jj a bit differently. Personally I don't like having a staging area; for me it's an opportunity to forget to add a change to a commit. I don't keep files in my work tree that I'm not going to commit or ignore.

But when I first moved to jj I tried to make it work as closely to git as I could. The model I used back then was to have a commit that I meant to upload eventually, and then a working commit on top of that. Then `git commit --all` was `jj squash` and `git commit foo bar` was `jj squash foo bar`.

Eventually I got lazy. It was an extra command, and I almost never have the situation where I don't want to include a file. In the rare case that I do, I'll create a new commit with `jj new` and squash that file into there (you could have a shortcut for it, but the long form is `jj new -m "foo changes" --no-edit && jj squash --to @+ foo`, and then keep working.


FWIW as a fan of git add -p I tend to use the “squash workflow” rather than commit -i.

Thanks, I'll try that :). Despite the fact that I've worked my way back to `git` for my mainline work, I've still got some repos that I've left jj live in to keep picking away at it.



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

Search: