A checkout is a working space after all, why can't it be (temporarily) dirty whilst you work?
A checkout is a working space after all, why can't it be (temporarily) dirty whilst you work?
From there, the simplest way is to just always use 'jj commit -i' and 'jj squash -i' to create change ids with your work. Then if you want to have your changes move around with you, just rebase your working copy which contains your "uncommitted files" to the new branch.
A different idea is to put those changes in a separate change, and then when you do work, always create your working space change as a merge change like 'jj new <uncommitted file change id> <main change id>. Then you should be able to do 'jj absorb' instead of 'jj squash' to put changes into the right change. Switching to a different branch is 'jj new <uncommitted file change id> <other change id>.
As in typing this, I'm thinking for myself and what I actually do in practice... I find moving / rebasing jj commits very easy (I have a UI tool that literally lets you drag and drop them) so I usually just commit these changes and then drag the commits around so it's not in the chain of when I want to send it out for review
> why can't it be (temporarily) dirty whilst you work?
Because that would go completely against how jj changes work.
instead of adding changes to a new commit, i split/squash them into the previous one so the current commit remains dirty