]>
Commit | Line | Data |
---|---|---|
215a7ad1 JH |
1 | git-format-patch(1) |
2 | =================== | |
7fc9d69f JH |
3 | |
4 | NAME | |
5 | ---- | |
35ef3a4c | 6 | git-format-patch - Prepare patches for e-mail submission. |
7fc9d69f JH |
7 | |
8 | ||
9 | SYNOPSIS | |
10 | -------- | |
54ba6013 | 11 | 'git-format-patch' [-n][-o <dir>|--stdout][-k][--mbox][--diff-options] <his> [<mine>] |
7fc9d69f JH |
12 | |
13 | DESCRIPTION | |
14 | ----------- | |
35ef3a4c JH |
15 | Prepare each commit with its patch since <mine> head forked from |
16 | <his> head, one file per patch, for e-mail submission. Each | |
17 | output file is numbered sequentially from 1, and uses the first | |
18 | line of the commit message (massaged for pathname safety) as the | |
19 | filename. | |
20 | ||
21 | When -o is specified, output files are created in that | |
22 | directory; otherwise in the current working directory. | |
23 | ||
24 | When -n is specified, instead of "[PATCH] Subject", the first | |
25 | line is formatted as "[PATCH N/M] Subject", unless you have only | |
26 | one patch. | |
27 | ||
28 | When --mbox is specified, the output is formatted to resemble | |
29 | UNIX mailbox format, and can be concatenated together for | |
30 | processing with applymbox. | |
7fc9d69f JH |
31 | |
32 | ||
33 | OPTIONS | |
34 | ------- | |
35ef3a4c JH |
35 | -o <dir>:: |
36 | Use <dir> to store the resulting files, instead of the | |
37 | current working directory. | |
38 | ||
39 | -n:: | |
40 | Name output in '[PATCH n/m]' format. | |
41 | ||
42 | -k:: | |
43 | Do not strip/add '[PATCH]' from the first line of the | |
44 | commit log message. | |
45 | ||
46 | --author, --date:: | |
47 | Output From: and Date: headers for commits made by | |
48 | yourself as well. Usually these are output only for | |
49 | commits made by people other than yourself. | |
7fc9d69f | 50 | |
35ef3a4c JH |
51 | --mbox:: |
52 | Format the output files for closer to mbox format by | |
53 | adding a phony Unix "From " line, so they can be | |
54 | concatenated together and fed to `git-applymbox`. | |
55 | Implies --author and --date. | |
7fc9d69f | 56 | |
54ba6013 JH |
57 | --stdout:: |
58 | This flag generates the mbox formatted output to the | |
59 | standard output, instead of saving them into a file per | |
60 | patch and implies --mbox. | |
7fc9d69f | 61 | |
28ffb898 JH |
62 | |
63 | EXAMPLES | |
64 | -------- | |
65 | ||
66 | git-format-patch -k --stdout R1..R2 | git-am -3 -k:: | |
67 | Extract commits between revisions R1 and R2, and apply | |
68 | them on top of the current branch using `git-am` to | |
69 | cherry-pick them. | |
70 | ||
71 | git-format-patch origin:: | |
72 | Extract commits the current branch accumulated since it | |
73 | pulled from origin the last time in a patch form for | |
74 | e-mail submission. | |
75 | ||
76 | ||
77 | See Also | |
78 | -------- | |
79 | gitlink:git-am[1], gitlink:git-send-email | |
80 | ||
81 | ||
7fc9d69f JH |
82 | Author |
83 | ------ | |
84 | Written by Junio C Hamano <junkio@cox.net> | |
85 | ||
86 | Documentation | |
87 | -------------- | |
88 | Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>. | |
89 | ||
90 | GIT | |
91 | --- | |
a7154e91 | 92 | Part of the gitlink:git[7] suite |
7fc9d69f | 93 |