| |- number of commits since the last tag |- the current commit is tagged with this tag name For this reason, some git commands for naming objects (like git describe) will ignore “lightweight” tags by default.Īt any time you can check if the current commit is tagged or what is the most recent tag name and how many commits ago it has been created: $ git describe “Annotated” tags are meant for releases while “lightweight” tags are meant for private or temporary object labels. Whereas a tag without tagging message is called “lightweight” tag. If you want to include a description with your tag, add -a to create an “annotated” tag: $ git tag -aĬreate an “annotated” tag with the given message (instead of prompting): $ git tag -a -m "Message"Īnnotated vs Lightweight: A Git tag created with -a option is called “annotated” tag. I will also show how to find out the most recent tag name and how many commits ago it has been created.Ĭool Tip: How to list all tags in Git! Read more → Git Create TagĬreate a “lightweight” tag on a current branch: $ git tag In this note i will show how to create a Git tag and push it remote repository using the git tag and git push commands. Tags in Git are used to label specific commits (to mark releases, for example).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |