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

You want "jj commit -i". You'll get an interface that lets you choose files, chunks, or lines to commit.




Or the shorthand: jj ci -i

Or if you don't care to set a commit message just yet: jj split -i

Or if you want to defer making sure each commit has the right content until later, just use jj new, and then later use jj squash and jj split to make the commits have sensible changes, and jj desc to set the descriptions.


Sold!

I'm trying jj. I've seen enough mentions now. I've never read anything about it.

I hope it's compatible with git.


The compatibility with git is the whole reason it's so popular (just run `jj git init --colocate` in your git repo). You can use it without forcing your collaborators to switch from git and you can use it will a git forges as well.

I don't think you need `--colocate` any more, and maybe you don't even need `git`? I tried `jj init` in a git repo the other day and it did create a colocated jj repo, as far as I could see.

Not sure on `jj init`, but yeah colocation is default as of I believe 0.34

With git I can stage lines right in my IDE, no messing around in shitty TUIs.




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

Search: