user4979733
user4979733

Reputation: 3411

Git missing tags when doing fresh repo clone/checkout

I have a repo on machineA [edit: and another, separate repository on a server or hosting provider] which has some tags. I see these tags [on machineA] when I do git tag -l or look in.git/refs/tags:

$ ls .git/refs/tags
v0.0.1  v0.0.2  v0.0.3  v0.0.4

Now, if I go to machineB and do a clone of the repo [that is on the server or hosting provider, not the repo on machineA]. None of the tags are available [on machineB]. I tried git fetch --all --tags. I also tried git tag -l. The .git/refs/tags is empty also. What am I doing wrong? These tags were inserted by the python-semantic-release module.

Upvotes: 1

Views: 764

Answers (1)

torek
torek

Reputation: 488203

As in the comments and my update of your question with corrected facts, the problem is that you've never sent the tags from machineA to the server-or-hosted repository. You need to use git push --tags, or an explicit git push of each tag, from machineA to the server, so that the server will have the tags, before machineB can get those tags from the server.

(Cloning on machineB directly from machineA would also work.)

Upvotes: 3

Related Questions