logoalt Hacker News

aduwahtoday at 7:05 PM2 repliesview on HN

The only reason I have not defaulted to jj already is the inability to be messy with it. Easy to make mistakes without "git add"


Replies

llyamatoday at 7:58 PM

You can be messy. The lack of an explicit staging area doesn't restrict that. `jj commit` gives the same mental model for "I want to commit 2 files from the 5 I've changed".

dzaimatoday at 7:57 PM

But you do have the op log, giving you a full copy of the log (incl. the contents of the workspace) at every operation, so you can get out of such mistakes with some finagling.

You can choose to have a workflow where you're never directly editing any commit to "gain back autonomy" of the working copy; and if you really want to, with some scripting, you can even emulate a staging area with a specially-formatted commit below the working copy commit.