by aduwah · 8mo ago · 0 comments
You really ought to dive in deeper. jjui makes it all vastly simpler
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.
Or treat the head commit as just a scratch space and the one before it as equivalent to git staged index, and use `jj squash PATH`, `jj squash -i` etc to "stage" things, or directly `jj commit -m "foo" PATHS` (or -i) to make a new commit with just wanted changed. This is what I do.