One of my favorite jj features is "jj absorb".
For each change you've made in the current revision, it finds the last commit where you made a change near there, and moves your changes to that commit.
Really handy when you forgot to make a change to some config file or .gitignore. You just "jj new", make the changes, and "jj absorb". No need to make a new commit or figure out where to rebase to.
Oh, and not having to deal with merge conflicts now is awesome. My repository still has merge conflicts from months ago. I'll probably go and delete those branches as I have no intention to resolve them.
And If `jj absorb` gets it wrong, you can run `jj undo`.
This is such a killer feature to me. I'm not scared to start potentially gnarly rebases anymore because I can painlessly undo.
Yes. With "jj undo", I'm not scared to do anything. The brief time I had to go back to using vanilla "git", I didn't enjoy being extra cautious.
Using a version control tool shouldn't require much self discipline.
yeah, i regularly try absorb then undo when it moves it to a commit from 7 years ago, then manually squash where appropriate
After hearing about a workflow that used absorb I wrote a simple git version I called 'squash-index' in about 15 lines of bash in a few minutes. Since git allows subcommand extension I just made an executable 'git-squash-index' and everything worked as if it was a builtin subcommand. I get that initial ergonomics are important for new tools but if the only novel feature is reified merge conflicts it doesn't really seem worth making the switch. No one needed to evangelize git to people like myself who had worked with a variety of old version control systems (cvs, svn, etc). It was just obviously much, much better. jj seems like it streamlines certain things, and might be worth learning for new users who have no git experience, but doesn't really differentiate itself enough for people who've been using git for a long time.
How easy is it to version control the index and stash in git? Do I need to know any other commands?
With jj, it's the same as any other commit. No new commands, no new options.
git absorb exists too fyi
Not by default: https://github.com/tummychow/git-absorb