How do you push a tag to a remote repository using Git?

前端 未结 9 1060
滥情空心
滥情空心 2020-11-22 16:31

I have cloned a remote Git repository to my laptop, then I wanted to add a tag so I ran

git tag mytag master

When I run git tag

9条回答
  •  被撕碎了的回忆
    2020-11-22 17:10

    I am using git push tag to ensure that I am pushing a tag. I use it like: git push origin tag v1.0.1. This pattern is based upon the documentation (man git-push):

    OPTIONS
       ...
       ...
           ...
           tag  means the same as refs/tags/:refs/tags/.
    

提交回复
热议问题