Git annotated tags are stored as full objects in the Git database, and include useful metadata related to each individual tag.Īnnotated tags allow you to include messages with each tag in similar fashion to commit messages, and also stores the tagger name, email and date the tag was created. Oftentimes, it’s wise to include some additional information when creating tags in Git. git directory that contains the GUID of the tagged commit. We can see from the contents of this file that a Git lightweight tag is simply a file in the. In fact, we can locate our previously created patch version tag in this location and take a look at the contents: $ cat. Git stores each lightweight tag as a file in the. Git defaults to using what are called lightweight tags. $ git tag v1.0.1Īs you can see from the output, we have a new version v1.0.1 that represents our latest patch version update. Keep in mind, git tag will default to currently checked out commit, i.e. Īnd finally, let’s tag this new commit with an updated patch version. Now let's add our changes to Git's staging area and commit them: $ git add. We’ll be updating the patch version using the semantic versioning convention. Next, we’ll add a few lines of comments to the previously empty file file1.ext: file1.ext Let’s take a look at an example Git project tree git-tag-ex/ with a few nested files and a nested directory dir1/: git-tag-ex/
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |