[Pkg-mc-devel] MC 4.8.1-3

Dmitry Smirnov onlyjob at member.fsf.org
Sun Mar 18 02:29:48 UTC 2012


Hi Andreas.

> > PS: I noted that we have
> > 
> > $ git tag
> > 4.8.1-2
> > debian/4.8.1-1
> > debian/4.8.1-3
> > 
> > My Git knowledge is not sufficient to know how to rename tags.  I think
> > we should settle with a unique naming scheme.  Feel free to decide for
> > one and rename the tags that do not fit.

It looks like tags are immutable so there is no way to rename them.

As I just learned, the easiest way is to delete the wrong tag and add a new 
one would be:

    git tag --delete "4.8.1-2"		# Deleted tag '4.8.1-2' (was f1de884)
    git tag "debian/4.8.1-2" f1de884

But I added a new tag first:

    git rev-parse 4.8.1-2			# get tagged commit ID
    git tag "debian/4.8.1-2" f1de884
    git tag --delete "4.8.1-2"		# Deleted tag '4.8.1-2' (was f1de884)


'git tag --delete' only remove tag from local repository so the real trick is 
how to delete tag from remote repo (I would never guess):

    git push origin :refs/tags/4.8.1-2

However deleted tags are not propagating to already clonned repositories with 
'git fetch --tags' because it wouldn't be nice to change tags behind people's 
back.

If wrong commit-ID mistakenly tagged, git manual suggest to notify
people so they could delete the wrong tag and fetch new.

In our case it's even easier because the very same commit-ID got the new tag 
so the only thing you might want to do is to delete an old tag in your local 
repository to avoid accidentally pushing it again.


All the best,
Dmitry.



More information about the Pkg-mc-devel mailing list