Assume you have commits A B C D E where E is the newest commit
jj log
note: jj commit names are on the left, git on the right (usually unimportant)
jj squash -i --into B --from C
NOTE! the -i is important, otherwise it will put all of B in C. Though you can undo with jj undo
jj edit B
# do edits
jj edit E # automatically rebases
jj git fetch --remote origin --branch main # pulls git origin/main into .git data
jj rebase -s C -d main@origin # -s means --source, -d means --destination so "rebase src on dst"