开发者

How to tag a certain changeset in Git?

开发者 https://www.devze.com 2023-04-10 06:56 出处:网络
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

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 stas开发者_运维问答h either because it may already contain something.


See the man:

git tag <tagname> <commit>


Just use:

git tag tag_name commit_hash

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

0

精彩评论

暂无评论...
验证码 换一张
取 消