Search code examples
gitnumberspatchformat-patch

git format-patch disable patch number in subject line


When I use git format-patch to create multiple patch files at once, the number of the patch is added to the subject line.

Subject: [PATCH <number>/<amount>] <msg>

Is it possible to disable <number>/<amount>?


Solution

  • That's the default action if there are multiple patch files. To avoid numbering patch subjects ever, use -N or --no-numbered. To force numbering even if there is only one patch, use -n or --numbered. The --numbered / --no-numbered spelling pair mirrors other Git commands with boolean options, and other options in git format-patch itself, such as --[no-]cover-letter, --no-thread vs --thread[=<style>], and so on.

    For more details, see the documentation.