The default behavior of Git is not to push tags from a local repository to an associated remote one. In this answer it is explained how to change this behavior for a single repository.
My question, is why is this the designed behavior of Git? In particular what are the cons of setting on automatic push of tags?
Sharing tags is similar to pushing branches. By default, git push will not push tags. Tags have to be explicitly passed to git push .
The new " --follow-tags " option tells " git push " to push relevant annotated tags when pushing branches out. That won't push all the local tags though, only the one referenced by commits which are pushed with the git push .
If git push origin master not working , all you need to do is edit that file with your favourite editor and change the URL = setting to your new location. Assuming the new repository is correctly set up and you have your URL right, you'll easily be able to push and pull to and from your new remote location.
Yes! The difference between a branch name and a tag name is that a branch name is expected to move, and git will move it automatically in that "on a branch" case.
If you consider the tags of any large project (kernel linux, git itself, ...) you would see tags in the hundreds.
A Distributed VCS is all about publication: what do you want to push?
Everything? All the time?
Pushing all tags can pollute the tags space from the upstream repo.
With the current behavior, you keep the control of what you are publishing to the upstream repo, for others to see.
Note that since git 1.8.3 (April 2013), the git push --follow-tags
can help you push commits and their associated tags in one command.
See "Push git commits & tags simultaneously".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With