Tools like the stash are band aids that come with their own set of “fun” failure modes.
The easiest and by far most common thing to do of course is to just complete the commit you're working on before switching branches.
Wouldn’t it be nice if there was a tool that didn’t need you to internalize all these workarounds?
I don't consider any of this a problem, but why don't you tell me how your preferred tool does it.
jj needs neither because everything in your working copy is already part of a commit. You can’t accidentally push unfinished changes because jj will complain if it hasn’t been described (given a commit message). If you need to move changes between commits you don’t need to stash because you can easily move the contents of a commit around.
I can see that being nice I guess.
If jj's stashes are just regular commits, don't you have the problem where you accidentally push a stash just like you push a WIP commit?
Because jj doesn’t require commits to be on a branch, and the equivalent feature (bookmarks) don’t automatically advance, if you created a new commit to stash some stuff, the name wouldn’t move to it, and so when you push nothing would happen.
Theres no overhead at all in thinking these, you can never lose work by mistake, you can never mess it up. It just works
Then checkout the new branch and do my work.
When I come back, `git reset --soft HEAD^`, and continue