Lightweight tags contain only the commit checksum (no other information is stored). To create an anotated tag, add -a tagname -m "tag message" to the git tag command: $ git tag -a v4.0 -m "release version 4.0"Īs you can see, the -a specifies that you are creating an annotated tag, after comes the tag name and finally, the -m followed by the tag message to store in the Git database. On the other hand, lightweight tags don require a mesage or store other data, working just as a pointer to a specific point in the project. They first ones are compete objects in GIT database: they are checksummed, requiere a message (like commits) and store other important data such as name, email and date. You can create two type of tags: annotated and lightweight. You can find tags containing specific characters adding an -l to the git tag command: $ git tag -l "v2.0*" This way of listing tags is great for small projects, but greater projects can have hundreds of tags, so you may need to filter them when searching for an important point in the history. You can list all available tags in a project with the git tag command (nate that they will appear in alphabetical order): $ git tag The tags names may be used instead of commit IDs while checking out and pushing commits to a remote repo. Incase, you’d like to tag a previous commit specify the commit ID you’d like to tag: git tag -a v1.2 9fceb02 These create tags on your current commit. They differ in the way that they are stored. To get more information on a tag: git show v1.4Īnnotated git tag -a v1.2 -m "my version 1.4" To view all the created tags in alphabetical order: git tag (Ex: v1.3.2) It essentially allows you to give a commit a special name(tag). For instance, software release versions can be tagged. Tagging lets developers mark important checkpoints in the course of their projects' development.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |