I have just set up a local git repo and replicated it to a remote repo, based upon a Google "Cloud Source Repository". This mostly worked fine, except that the tags haven't been replicated. I have some older google repos, built in the same way (as far as I can remember), that do have tags. So I'm not sure what is going on.
The process was to:
git tag -a V1.0.0 -m "The initial working version"
,git push --all google
.All of which seems to have worked fine, except that there are no tags in the remote repo. The output of the git tags command is shown below, and I can see the tags fine in the gitk GUI. So the issue isn't with the local repo. The tags just haven't made it into Google's repos.
$ git tag
V1.0.0
V1.0.1
V1.1.0
V2.0.0
The push output follows: no errors.
git push --all google
Counting objects: 25, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (20/20), done.
Writing objects: 100% (25/25), 5.03 KiB | 2.51 MiB/s, done.
Total 25 (delta 7), reused 0 (delta 0)
remote: Resolving deltas: 100% (7/7)
To https://source.developers.google.com/p/<REDACTED>/r/git_test
* [new branch] master -> master
Thanks to John for pointing out what is expected behaviour! From git-scm.com/book "By default, the git push command doesn’t transfer tags to remote servers."
So you need an explicit: git push --tags google
in my case, or git push --tags origin
in the typical case.