10

Git 推送和删除远程标签

 2 years ago
source link: https://blog.csdn.net/shines/article/details/8558293
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

( 转载自:http://ihacklog.com/post/how-to-push-and-delete-a-remote-git-tag.html )

 1. git tag

事实上 `Git` 的推送和删除远程标签命令是相同的,删除操作实际上就是推送空的源标签 `refs`:

git push origin 标签名
git push origin refs/tags/源标签名:refs/tags/目的标签名

`git push` 文档中有解释:

tag <<tag>> means the same as refs/tags/<tag>:refs/tags/<tag>.

Pushing an empty <src> allows you to delete the <dst> ref from the remote repository.

推送标签:

git push origin 标签名

删除本地标签:

git tag -d 标签名

删除远程标签:

其他本地操作:

2. 参考文章

[1]: http://nathanhoad.net/how-to-delete-a-remote-git-tag

[2]: http://linux.die.net/man/1/git-push](http://linux.die.net/man/1/git-push


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK