tj.git-extras/man/git-release.md
2017-05-02 14:53:36 +08:00

2.3 KiB

git-release(1) -- Commit, tag and push changes to the repository

SYNOPSIS

git-release <tagname> [-r <remote>] [-m <commit info>] [-c] [[--] <hook arguments...>]

DESCRIPTION

Commits changes with message "Release <tagname>" or custom commit information, tags with the given <tagname> and pushes the branch / tags.

Optionally it generates a changelog (see git-changelog) and a remote can be defined. The order of first -c or -r does not matter.

If .git/hook/pre-release or .git/hook/post-release exist, they will be triggered with tagname and extra hook arguments before/after the release.

OPTIONS

<tagname>

The name of the newly created tag. Also used in tag comment.

-r <remote>

The "remote" repository that is destination of a push operation: it is passed to git push.

-m <commit info>

use the custom commit information instead of the default message "Release <tagname>" .

-c

Generates or populates the changelog with all commit message since the last tag. For more info see git-changelog..

[--] hook arguments...

The arguments listed after "--" separator will be passed to pre/post-release hook following the tagname.

EXAMPLES

  • Release commit with the given <tagname>.

    $ git release 0.1.0

  • Release commit with the given <tagname> and custom commit message.

    $ git release 0.1.0 -m "+ powerful feature added."

  • Release commit with the given <tagname> and push to specific remote.

    $ git release 0.1.0 -r github

  • Release commit with the given <tagname> and populate changelog.

    $ git release 0.1.0 -c

  • Release commit with the given <tagname>, populate changelog, and push to specific remote.

    $ git release 0.1.0 -r github -c

  • Release commit with the given <tagname>, pass <tagname> and extra argument to release hook, populate changelog, and push to specific remote.

    $ git release 0.1.0 -r github -c -- --signature-required

AUTHOR

Written by Tj Holowaychuk <tj@vision-media.ca> Extended by David Hartmann <dh@tsl.io>

REPORTING BUGS

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

SEE ALSO

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