1CG-MKPATCH(1) CG-MKPATCH(1)
2
3
4
6 cg-mkpatch - create a patch from a commit or a series of commits
7
9 cg-mkpatch [-m] [-s] [-r FROM_ID[..TO_ID] [-d DIRNAME]]
10
11
13 Generate a patch with diff statistics and meta info about each commit.
14
15 Note that if you want to use this as the output interface for your GIT
16 tree containing changes against upstream GIT tree, please consider
17 using the StGIT tool ("quilt for GIT"), which will enable you to update
18 your patches seamlessly, rebase them against the latest upstream
19 version, directly send them over mail, etc.
20
21
23 -d DIRNAME
24 Split the patches to separate files with their names in the
25 format "%02d.patch", created in directory DIRNAME (will be
26 created if non-existent). Note that this makes sense only when
27 generating patch series, that is when you use the -r argument.
28
29 -f FORMAT
30 Format string used for generating the patch filename when
31 outputting the split-out patches (that is, passed the -d
32 option). This is by default "%s/%02d-%s.patch". The first %s
33 represents the directory name and %d represents the patch
34 sequence number. The last %s is mangled first line of the commit
35 message - kind of patch title.
36
37 -m Base the patches at the merge base of the -r arguments
38 (defaulting to HEAD and origin).
39
40 -r FROM_ID[..TO_ID]
41 Specify a set of commits to make patches from using either -r
42 FROM_ID[..TO_ID] or -r FROM_ID -r TO_ID. In both cases the
43 option expects IDs which resolve to commits and will include the
44 specified IDs. If TO_ID is omitted patches for all commits from
45 FROM_ID to the initial commit will be generated. If the -r
46 option is not given the commit ID defaults to HEAD.
47
48 -s Specify whether to print a short version of the patch without a
49 patch header with meta info such as author and committer.
50
51 -h, --help
52 Print usage summary.
53
54 --long-help
55 Print user manual. The same as found in cg-mkpatch(1).
56
58 To make patches for all commits between two releases tagged as
59 releasetag-0.9 and releasetag-0.10 do:
60
61
62 $ cg-mkpatch -r releasetag-0.9..releasetag-0.10
63 The output will be a continuous dump of patches each separated by the
64 line:
65
66
67 !-------------------------------------------------------------flip-
68
70 The : is equivalent to .. in revisions range specification (to make
71 things more comfortable to SVN users). See cogito(7) for more details
72 about revision specification.
73
74
76 Copyright © Petr Baudis, 2005
77
78
80 cg-mkpatch is part of cogito(7), a toolkit for managing git(7) trees.
81
82
83
84
85 12/11/2006 CG-MKPATCH(1)