2

I am unsure if what I want to do is sensible in git. It works but is it sensible?

I create an annotated tag against a commit with a message. Then using the -f option, I update / change the message against the same commit.

Tag has same name, points to the same commit but message is changed. There is a new tag object according to the return text.

Is it possible to look at the history of the tag as it changed?

And is changing the tag message whilst pointing to the same commit going to cause problems if the tag with original message had already been shared?

Regards

John
  • 1,593
  • 3
  • 17
  • 28

2 Answers2

1

A tag is nothing more than a pointer to a commit. History of tags is not kept.

Annotated tags work slightly different. But their purpose remains the same.

Jeroen3
  • 919
  • 5
  • 20
0

Tags don't keep a history. You might want to look at notes instead. https://git-scm.com/docs/git-notes

I don't expect git itself to have a problem with you reusing a tag name, but whether it will cause confusion within your workflow is something I can't predict.

Mark Adelsberger
  • 42,148
  • 4
  • 35
  • 52
  • Must admit I did not know much about notes but have just read up on them. I can see that they are certainly useful for updating a commit message without creating a new commit. But the updated tag still pointed to the same commit. I think I will stick with tags for the moment – John Jul 12 '17 at 14:30