开发者

Tagging a git repo?

I am new to git (been using svn and mercurial for awhile). Is there a way to 'tag' my git repository? Something like tagging it "version 12, removed red square.". I'd like to pull the source state at the time the tag was added, if I ever need to revert to a known snapshot of the code. Is it possible? Would be cool, if a year from now, I'm looking through m开发者_运维技巧y repo and can see all my tags, and pull out the code at different states during development,

Thank you


The command is git tag, read about it with git help tag.

Next time use git help -a to find the obvious answer.

Even if you don't have a tag, you can always go through git log, find the commit you're interested in, and git checkout (or git tag) it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜