File: git-changelog.1

package info (click to toggle)
git-extras 6.1.0-1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 1,720 kB
  • sloc: sh: 3,480; makefile: 126
file content (167 lines) | stat: -rw-r--r-- 4,630 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-CHANGELOG" "1" "June 2018" "" "Git Extras"
.
.SH "NAME"
\fBgit\-changelog\fR \- Generate a changelog report
.
.SH "SYNOPSIS"
\fBgit\-changelog\fR [options] [<file>]
.
.br
\fBgit\-changelog\fR {\-h | \-\-help | ?}
.
.SH "DESCRIPTION"
Generates a changelog from git(1) tags (annotated or lightweight) and commit messages\. Existing changelog files with filenames that begin with \fIChange\fR or \fIHistory\fR will be identified automatically with a case insensitive match pattern and existing content will be appended to the new output generated\-\-this behavior can be disabled by specifying the prune option (\-p|\-\-prune\-old)\. The generated file will be opened in \fB$EDITOR\fR when set\.
.
.P
If no tags exist, then all commits are output; if tags exist, then only the most\-recent commits are output up to the last identified tag\. This behavior can be changed by specifying one or both of the range options (\-f|\-\-final\-tag and \-s|\-\-start\-tag)\.
.
.P
You could customize the changelog format via some git config options\.
.
.IP "\(bu" 4
\fBgit config changelog\.format $format\fR controls the format of each commit\. It will be passed as \fBgit log \-\-pretty=format:$format\fR\. The default value is \fB* %s\fR\.
.
.IP "\(bu" 4
\fBgit config changelog\.mergeformat $format\fR is like changelog\.format but only used when \fB\-\-merges\-only\fR is specified\. The default value is \fB* %s%n%w(64,4,4)%b\fR\.
.
.IP "" 0
.
.SH "OPTIONS"
<file>
.
.P
The name of the output file\. By default the new file will be \fIHistory\.md\fR unless an existing changelog is detected in which case the existing file will be updated\.
.
.P
\-a, \-\-all
.
.P
Retrieve all commits\. Ignores \-s|\-\-start\-tag/commit and \-f|\-\-final\-tag options (if set)\.
.
.P
\-l, \-\-list
.
.P
Show commits in list format (without titles, dates)\.
.
.P
\-t, \-\-tag
.
.P
Specify a tag label to use for most\-recent (untagged) commits\.
.
.P
\-f, \-\-final\-tag
.
.P
When specifying a range, the newest tag at which point commit retrieval will end\. Commits will be returned from the very first commit until the final tag unless a start tag is also specified\.
.
.P
\-s, \-\-start\-tag
.
.P
When specifying a range, the oldest tag to retrieve commits from\. Commits will be returned from the start tag to now unless a final tag is also specified\.
.
.P
\-\-start\-commit
.
.P
Like the \-\-start\-tag but specify the oldest commit instead of tag\. Note that the specified commit will be contained in the changelog\.
.
.P
\-n, \-\-no\-merges
.
.P
Filters out merge commits (commits with more than 1 parent) from generated changelog\.
.
.P
\-m, \-\-merges\-only
.
.P
Uses only merge commits (commits with more than 1 parent) for generated changelog\. It also changes the default format to include the merge commit messages body, as on github the commits subject line only contains the branch name but no information about the content of the merge\.
.
.P
\-p, \-\-prune\-old
.
.P
Replace existing changelog entirely with newly generated content, thereby disabling the default behavior of appending the content of any detected changelog to the end of newly generated content\.
.
.P
\-x, \-\-stdout
.
.P
Write output to stdout instead of to a new changelog file\.
.
.P
\-h, \-\-help, ?
.
.P
Show a help message with basic usage information\.
.
.SH "EXAMPLES"
.
.TP
Updating existing file or creating a new \fIHistory\.md\fR file with pretty formatted output:
.
.IP
$ git changelog
.
.TP
Listing commits from the current version:
.
.IP
$ git changelog \-\-list
.
.TP
Listing a range of commits from 2\.1\.0 to now:
.
.IP
$ git changelog \-\-list \-\-start\-tag 2\.1\.0
.
.TP
Listing a pretty formatted version of the same:
.
.IP
$ git changelog \-\-start\-tag 2\.1\.0
.
.TP
Listing a range of commits from initial commit to 2\.1\.0:
.
.IP
$ git changelog \-\-list \-\-final\-tag 2\.1\.0
.
.TP
Listing a pretty formatted range of commits between 0\.5\.0 and 1\.0\.0:
.
.IP
$ git changelog \-\-start\-tag 0\.5\.0 \-\-final\-tag 1\.0\.0
.
.TP
Listing a pretty formatted range of commits between 0b97430 and 1\.0\.0:
.
.IP
$ git changelog \-\-start\-commit 0b97430 \-\-final\-tag 1\.0\.0
.
.TP
Specifying a file for output:
.
.IP
$ git changelog ChangeLog\.md
.
.TP
And if an existing Changelog exists, replace its contents entirely:
.
.IP
$ git changelog \-\-prune\-old
.
.SH "AUTHOR"
Written by Mark Eissler <\fImark@mixtur\.com\fR>
.
.SH "REPORTING BUGS"
<\fIhttps://github\.com/tj/git\-extras/issues\fR>
.
.SH "SEE ALSO"
<\fIhttps://github\.com/tj/git\-extras\fR>