← 返回命令列表

Linux command

git-release 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Create release tag

git release [version]

Create with message

git release [version] -m "[message]"

Create and push

git release [version] --push

说明

git release creates a release by tagging the current commit with the specified version number and pushing the tag (and any pending commits) to the remote. It is part of the git-extras suite of utilities and streamlines the release workflow by combining tag creation, optional signing, and publishing in one operation. Common usage follows semantic versioning (e.g., `git release 1.2.3`). The command creates an annotated tag, which can include release notes via the `-m` option and cryptographic signing via `-s` for verification.

参数

-m, --message _text_
Tag message.
--push
Push after tagging.
-s, --sign
Sign tag.

FAQ

What is the git-release command used for?

git release creates a release by tagging the current commit with the specified version number and pushing the tag (and any pending commits) to the remote. It is part of the git-extras suite of utilities and streamlines the release workflow by combining tag creation, optional signing, and publishing in one operation. Common usage follows semantic versioning (e.g., `git release 1.2.3`). The command creates an annotated tag, which can include release notes via the `-m` option and cryptographic signing via `-s` for verification.

How do I run a basic git-release example?

Run `git release [version]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -m, --message _text_ do in git-release?

Tag message.