git 創建 tag 命令


1.創建
      git tag -a tagname -m "comments"   //本地創建
2.刪除
     git tag -d tagname   //本地刪除
3.修改
     git tag -f new_name old_name
     git tag -d old_name
4.查看
     git tag -l n1(n1表示註釋顯示一行)

5.提交

     push所有tag,命令格式爲:git push [origin] --tags

     git push --tags 或

     git push origin --tags   //提交所有tag,不提交分支


     git push origin tagname    //提交單個tag
6.gerrit權限控制
    需要給用戶添加Push Annotated Tag權限
7.遠程操作
    查看遠程tag
     git ls-remote --tags //查看遠程倉庫標籤
    提交遠程
     git push origin tagname //提交單個標籤
     git push origin --tags      //提交所有標籤
刪除
     git push origin :refs/tags/version xxx
抓取

     git checkout tag_name

    以上命令經檢驗通過,如果不起作用,請在Git控制檯上確認你的賬號是否有權限推送Tag。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章