Comment by stouset
Rewriting these for jj users. I'm prefering long option names and full command names for clarity here, but all the commands have shortened aliases and all the option names have single-letter alternatives. `@` means "the current revision", `x+` means "the revision just after `x`", `x-` means "the revision just before `x`".
2. "Accidentally committed something to master that should have been on a brand new branch".
This doesn't really have an analogue. Branches ("bookmarks") only move when you tell them to. If you make a new commit on top of master, it doesn't point master to it, it just lives one past the tip of master. But let's say you accidentally moved master to include the new commit you shouldn't have:
    # set master to the previous commit (and reaffirm that
    # you're okay moving a bookmark backward)
    $ jj bookmark set master --allow-backwards --revision @- 
    # there is no step two, you're still editing the change you already were
    # move the revision one-past-master on to our desired bookmark
    $ jj rebase --revision master+ --destination name-of-the-correct-bookmark
    # there is also no step two; technically we're not updating the bookmark
    # to point to the new commit yet, but this isn't something you'd do as rote
    # habit in jujutsu anyway
    # list all the operations I've performed against the repo
    $ jj op log
    # restore to some previous known-good state
    $ jj op restore {id}
> Oh shit, I committed and immediately realized I need to make one small change!
    # move the current edits into the previous revision
    $ jj squash
    # re-describe the previous revision
    $ jj describe --revision @-
    # there is no staging area, all your changes are part of the repo and there is no
    # staging area pseudo-commit; please understand that this still works elegantly
    # with "patch-add" workflows and does not imply that large change sets can't be
    # easily broken up into small commits
    # find the commit
    $ jj log
    # back it out
    $ jj backout {id}
    # find the commit
    $ jj log
    # restore the paths provided to their contents in the given revision
    $ jj restore --from {id} [paths...]
> Oh shit, I committed and many commits later realized I need to make one small change!
    # moves the changes in the current working copy into the revision provided
    $ jj squash --into {id}
    # sets your working copy to the commit provided; later commits will be
    # auto-rebased on top live as you make modifications
    $ jj edit {id}
    # does what it says on the tin
    $ jj rebase --revision {a} --insert-before {b}
    # look in the "obsolete log" for earlier iterations of the current revision
    $ jj obslog
    # restore the contents
    $ jj restore --from {id} [paths...]
    # choose the parts to move out; you'll end up with two revisions, one with each half
    $ jj split
    # choose the parts to move out; you'll end up with two revisions, one with each half
    $ jj split
    # move the stuff I pulled out onto master
    $ jj rebase --revision @- --destination master
    # optional: name it; most of the time you wouldn't bother
    $ jj bookmark create new-name --revision master+
    # author a new change on top of master and name it a
    $ jj new master
    …
    $ jj bookmark create a
    # author a new change on top of a and name it b
    $ jj new
    …
    $ jj bookmark create b
    # author a new change on top of b and name it c
    $ jj new
    …
    $ jj bookmark create c
    # edit a; nothing else is necessary to ensure b and c remain as descendants of
    # revision a
    jj edit a
    …
    # author a new change as part of b; nothing else is necessary to ensure c remains
    # up to date on top of b
    $ jj new --insert-before c
    …
    # point c at the new change
    $ jj bookmark set b
Please kindly write one for a jj-specific issue: "my build vomitted out a bunch of files and I used any jj command before editing my .gitignore"
I've found myself using git to fix the mess in this particular instance.