Review finds a bug in the offset commit: PostgreSQL 1,289 rejects a negative OFFSET, so ?offset=-5 makes the API answer 500. Commit the fix with --fixup naming its target, and let --autosquash arrange the list:
# Edit app.js: treat a negative ?offset= as 0
git commit -qa --fixup=HEAD~1
GIT_SEQUENCE_EDITOR=cat git rebase -i --autosquash main
git log --oneline -3Output
pick 237ad84 # Add ?limit= to /api/books pick 9f72ca8 # Add ?offset= to /api/books fixup d65d121 # fixup! Add ?offset= to /api/books pick 53cf24b # Document ?limit= and ?offset= in the README ... Successfully rebased and updated refs/heads/paginate-api. d383198 Document ?limit= and ?offset= in the README 67d9a03 Add ?offset= to /api/books 237ad84 Add ?limit= to /api/books
The commit's fixup! subject told autosquash to move it under its target and mark it fixup. --squash= keeps both messages, and since Git 2.32 1,932 --fixup=reword:<commit> changes only the message. rebase.autoSquash true makes this the default for interactive rebases; since Git 2.44 plain git rebase --autosquash works too.