b4
Work with patches and pull requests in mailing lists
TLDR
SYNOPSIS
b4 [-d] [-q] [--version] subcommand [options]
DESCRIPTION
b4 is a helper tool for the distributed, patches-over-email development workflow used by the Linux kernel and many other projects hosted on public-inbox archives such as lore.kernel.org. It lets contributors prepare and send patch series, and lets maintainers retrieve, validate, and apply them without manually wrangling mailboxes.Given a message-id or an archive URL, b4 finds the entire thread, picks the latest revision of a series, collects review trailers (Acked-by, Reviewed-by, Tested-by) scattered across replies, and produces a clean, correctly ordered mbox. It can also verify cryptographic patch attestation, guess the base commit, and apply everything directly to a working tree.On the contributor side, the prep and send subcommands manage a series as a tracked branch, build the cover letter and recipient list, and dispatch the patches over SMTP or to a web submission endpoint.
SUBCOMMANDS
am
Retrieve a series and write it to a ready-to-apply mbox.shazam
Retrieve a series and apply it straight to the current git branch.prep
Create and manage a patch series for submission.send
Send a prepared patch series to its recipients.mbox
Download an entire thread as an mbox file.diff
Generate an interdiff between two revisions of a series.pr
Work with pull requests sent to the list.ty
Generate thank-you notes for applied or merged series.kr
Manage contributor public keys for attestation.
CAVEATS
b4 expects the upstream project to use a public-inbox archive (for example lore.kernel.org). Sending patches requires a working git send-email or SMTP configuration. Attestation verification depends on having contributor keys available locally.
HISTORY
b4 was written by Konstantin Ryabitsev at the Linux Foundation. It began life as a small script called get-lore-mbox and was renamed b4 (after the android character B-4 from Star Trek) as it grew into a full contributor and maintainer toolkit. It is widely used in Linux kernel subsystem workflows.
SEE ALSO
git-am(1), git-send-email(1), git-format-patch(1), git(1)
