Why doesn’t a git tag show up on any branch?

前端 未结 2 843
南旧
南旧 2021-01-02 12:15

I cloned the mosquitto repo that has tag v1.4.9. However the tagged commit does not appear to be on a branch.

How could that happen? Does the author actually keep a

2条回答
  •  悲&欢浪女
    2021-01-02 12:54

    I did something similar by mistake: I was about to push a new release, I committed everything on my PC and added a tag.

    Then I did git push --tags, thinking erroneously that it would push the master branch and the tag. Then I created a release on github. The release was pointing to the last changes, but the master branch was behind. I had to push again, and that aligned everything.

    The notable thing is that all the files were actually pushed with the first command (I saw it from the output, you know: creating deltas, etc). In the second push the transferred bytes reported 0, so I guess only branch metadata were pushed.

提交回复
热议问题