Tower
Tower

Reputation: 102905

How to tag a certain changeset in Git?

I am trying to find out how to tag a changeset that occurred earlier in the history. I am doing this as a feature part of a program, so, I can't do checkout and then tag, because the working copy may not be clean, and I dare not to modify the stash either because it may already contain something.

Upvotes: 1

Views: 1241

Answers (2)

manojlds
manojlds

Reputation: 301337

See the man:

git tag <tagname> <commit>

Upvotes: 6

Mat
Mat

Reputation: 206841

Just use:

git tag tag_name commit_hash

More on tags: Git tags in the Git Community Book.

Upvotes: 3

Related Questions