← 返回命令列表

Linux command

git-delete-tag 命令

安全

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

常用示例

Delete a local and remote tag

git delete-tag [tag_name]

Delete multiple tags at once

git delete-tag [tag1] [tag2]

说明

git delete-tag deletes a tag both locally and on the remote in a single operation. Part of the git-extras collection, it simplifies tag removal by combining what would normally require separate git tag -d and git push origin --delete commands. Tags typically mark release points or significant commits, but occasionally need removal due to mistakes, versioning changes, or release rollbacks. This command ensures synchronization between local and remote repositories, preventing scenarios where a deleted local tag still appears when fetching from the remote.

FAQ

What is the git-delete-tag command used for?

git delete-tag deletes a tag both locally and on the remote in a single operation. Part of the git-extras collection, it simplifies tag removal by combining what would normally require separate git tag -d and git push origin --delete commands. Tags typically mark release points or significant commits, but occasionally need removal due to mistakes, versioning changes, or release rollbacks. This command ensures synchronization between local and remote repositories, preventing scenarios where a deleted local tag still appears when fetching from the remote.

How do I run a basic git-delete-tag example?

Run `git delete-tag [tag_name]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

Where can I find more git-delete-tag examples?

This page includes 2 examples for git-delete-tag, plus related commands for nearby Linux tasks.