Re: git push tags
- From
- Drew Northup <n1xim.email@gmail.com>
- Date
- Oct 25, 2012, 17:19 UTC
- Message-ID
- <CAM9Z-nkxCOyrtJ8vCF=00vrA_1eFr2-Fk7PXjYEx0HbVt0GPkQ@mail.gmail.com>
- In-Reply-To
- <CAB9Jk9DMOwhDf3SvMzTmTZiyZg_4pgXx-evrfWkB3U4w-KqtVw@mail.gmail.com>
On Thu, Oct 25, 2012 at 2:58 AM, Angelo Borsotti <angelo.borsotti@gmail.com> wrote:
Show 18 quoted lines
> Hello, > > git push tag updates silently the specified tag. E.g. > > git init --bare release.git > git clone release.git integrator > cd integrator > git branch -avv > touch f1; git add f1; git commit -m A > git tag v1 > git push origin tag v1 > touch f2; git add f2; git commit -m B > git tag -f v1 > git push origin tag v1 > > the second git push updates the tag in the remote repository. This is > somehow counterintuitive because tags normally do not move (unless > forced to that), and is not documented.
You specified "-f" (force) and it did exactly what you asked. That is fully documented (git help tag).
> This is also harmful because it allows to change silently something > (tags) that normally must not change.
Tags have many uses. Some of those uses are harmed when tags change and some aren't. That's a philosophical argument and Git is a computer program, not a philosopher. It is not the job of the machine to prevent the user from shooting himself in the foot when he clearly expressed an interest in doing so.
-- -Drew Northup -------------------------------------------------------------- "As opposed to vegetable or mineral error?" -John Pescatore, SANS NewsBites Vol. 12 Num. 59