git push and fetch annotated tag does not create the tag

350 views Asked by At

I just created an annotated tag on machine A, then pushed the tag to the server S:

@A$ git tag -a v1 -m"Release version 1"
@A$ git push origin_on_S v1

Then on machine B, I tried to fetch the tag:

@B$ git fetch origin v1

I got the commit, but not the tag. The reply from fetch was:

From <server_S/repo>
 * tag               v1 -> FETCH_HEAD

Then nothing. FETCH_HEAD was updated, but apparently no annotated tag was created.

I am currently trying git fetch origin v1:v1, but I had the impression that git fetch tag should fetch both the data and the annotated tag. Was I wrong, or did I do something wrong to prevent this?

1

There are 1 answers

1
JSelser On

You need to do it like

git push --tags