1GIT-RELEASE(1)                    Git Extras                    GIT-RELEASE(1)
2
3
4

NAME

6       git-release - Commit, tag and push changes to the repository
7

SYNOPSIS

9       git-release  [<tagname>  |  --semver  <name>] [-r <remote>] [-m <commit
10       info>] [--no-empty-commit] [-c] [-s] [-u <key-id>] [--prefix <tag  pre‐
11       fix>] [[--] <hook arguments...>]
12

DESCRIPTION

14       Commits  changes  with message "Release <tagname>" or custom commit in‐
15       formation, tags with the given <tagname> and pushes the branch / tags.
16
17       This command always creates a release commit, which could be  empty  if
18       nothing changed. It works like git merge --no-ff. If you don´t like the
19       behavior, you could add --no-empty-commit to skip it.
20
21       Optionally it generates a changelog (see git-changelog)  and  a  remote
22       can be defined. The order of first -c or -r does not matter.
23
24       If  .git/hook/pre-release or .git/hook/post-release exist, they will be
25       triggered with tagname and extra hook arguments  before/after  the  re‐
26       lease.
27

OPTIONS

29       --semver <name>
30
31       If  the  latest tag in your repo matches the semver format requirement,
32       you could increase part of it as the new release tag with this  option.
33       The  name  must be one of the major, minor, patch. For example, assumed
34       the latest tag is 4.4.0, with git release --semver minor you will  make
35       a  new  release with tag 4.5.0. Use --prefix if tag has a character be‐
36       fore semver.
37
38       <tagname>
39
40       The name of the newly created tag. Also used in tag comment.
41
42       --prefix <tag prefix>
43
44       Use a prefix with a semver tag. git release --semver minor  --prefix  r
45       would increment the latest tag r4.4.0 to r4.5.0. This prefix can be any
46       length, without spaces.
47
48       -r <remote>
49
50       The "remote" repository that is destination of a push operation: it  is
51       passed to git push.
52
53       -m <commit info>
54
55       use  the  custom commit information instead of the default message "Re‐
56       lease <tagname>" .
57
58       --no-empty-commit
59
60       Avoid creating empty commit if nothing could be committed.
61
62       -c
63
64       Generates or populates the changelog with all commit message since  the
65       last tag. For more info see git-changelog..
66
67       -s
68
69       Create a signed and annotated tag.
70
71       -u <key-id>
72
73       Create a tag, annotated and signed with the given key.
74
75       [--] hook arguments...
76
77       The   arguments   listed   after  "--"  separator  will  be  passed  to
78       pre/post-release hook following the tagname.
79

EXAMPLES

81       •   Release commit with the given <tagname>.
82
83           $ git release 0.1.0
84
85       •   Release commit with the given <tagname> and custom commit message.
86
87           $ git release 0.1.0 -m "+ powerful feature added."
88
89       •   Release commit with the given <tagname> and push  to  specific  re‐
90           mote.
91
92           $ git release 0.1.0 -r github
93
94       •   Release commit with the given <tagname> and populate changelog.
95
96           $ git release 0.1.0 -c
97
98       •   Release  commit  with  the given <tagname>, populate changelog, and
99           push to specific remote.
100
101           $ git release 0.1.0 -r github -c
102
103       •   Release commit with the given <tagname>, pass <tagname>  and  extra
104           argument  to release hook, populate changelog, and push to specific
105           remote.
106
107           $ git release 0.1.0 -r github -c -- --signature-required
108
109
110

AUTHOR

112       Written by Tj Holowaychuk <tj@vision-media.ca> Extended by David  Hart‐
113       mann <dh@tsl.io>
114

REPORTING BUGS

116       <https://github.com/tj/git-extras/issues>
117

SEE ALSO

119       <https://github.com/tj/git-extras>
120
121
122
123                                  April 2022                    GIT-RELEASE(1)
Impressum