Git Bisect, Cherry-pick, and Submodule Cheat Sheet/Generate patch files from a branch

Create email-style patch files for commits not in main.

Section: Related Advanced Tools

Generate patch files from a branch

bash
bash
git format-patch origin/main
Explanation

Patch-centric workflows still matter in some projects and are useful for portable review or archival use.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Related Advanced Tools
Send patch files by email
Submit patches through email-based workflows.
OpenIn sheetbashsame section
Compare two patch series
Review how a series changed between two iterations.
OpenIn sheetbashsame section
Start bisect with good and bad revisions
Initialize bisect and mark boundaries.
OpenIn sheetbash1 tag match
Cherry-pick one commit
Apply the changes introduced by one commit onto the current branch.
OpenIn sheetbash1 tag match
Show submodule status
Inspect recorded commit pointers and checkout state.
OpenIn sheetbash1 tag match
Mark current commit as good
Tell bisect the current checked-out commit does not contain the bug.
OpenIn sheetbash1 tag match