zoukankan      html  css  js  c++  java
  • Git 推送和删除远程标签

    事实上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.

    推送标签:

    [plain] view plain copy

    1. git push origin 标签名 

    删除本地标签:

    [plain] view plain copy

    1. git tag -d 标签名 

    删除远程标签:

    [plain] view plain copy

    1. git push origin :refs/tags/标签名 
    2. git push origin :refs/tags/protobuf-2.5.0rc1 

    其他本地操作:

    [plain] view plain copy

    1. #打标签 
    2. git tag -a v1.1.4 -m "tagging version 1.1.4" 
    3. #删除本地仓库标签 
    4. git tag -d v1.1.4 
    5. #列出标签 
    6. git tag 
  • 相关阅读:
    github
    mysql安装和应用
    11月9日(visio安装很坑)
    11月4日
    11月3日
    10月29日
    10月26日
    10月25日
    9月29日
    9月28日
  • 原文地址:https://www.cnblogs.com/chjbbs/p/6432174.html
Copyright © 2011-2022 走看看