Search code examples
gitgerrit

Why tags should never be removed from server?


Reading Gerrit docs, it says:

[...] users should be really knowledgeable about git, 
for instance knowing why tags never should be removed from a server

It doesn't elaborate on this statement. I don't see any problem with it and I can't find any info about it either.

So, why tags should never be removed from server?


Solution

  • Why you shouldn't remove a remote tag is explained at the bottom of http://git-scm.com/docs/git-tag, section "On Re-tagging".

    In short: if a collaborator has already fetched the tag once, it won't update it after you change it. Hence the tag becomes rather useless since it represents a commit A in the remote repo, but it may represent a commit B in the repos of a few developpers