Dror
Dror

Reputation: 13081

Why git doesn't push tags by default?

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?

Upvotes: 21

Views: 2711

Answers (1)

VonC
VonC

Reputation: 1329292

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".

Upvotes: 9

Related Questions