简体   繁体   中英

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 my 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM