There's more...

If you want to avoid opening the commit message editor, as in step 17 of the Autosquashing commits recipe, you can use --fixup=d539645. This will use the commit message from the first commit and totally disregard any message written in the commits.

Get Git Version Control Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.