How do you push a Git tag to a branch using a refspec?

后端 未结 4 1554
迷失自我
迷失自我 2020-12-07 06:49

I want to force push, for example, my tag 1.0.0 to my remote master branch.

I\'m now doing the following:

git push producti         


        
4条回答
  •  盖世英雄少女心
    2020-12-07 07:51

    For pushing a single tag: git push

    For instance, git push production 1.0.0. Tags are not bound to branches, they are bound to commits.

    When you want to have the tag's content in the master branch, do that locally on your machine. I would assume that you continued developing in your local master branch. Then just a git push origin master should suffice.

提交回复
热议问题