11/25/2023 0 Comments Git tag history![]() If we want to make it as an annotated tag, we need to supply -a, and a message with -m: git/refs/tags/example, which points to the current commit. This creates a lightweight tag as a reference in. We can create a simple tag, based on the current repository's version, with: This may include release notes, the meta-information about the release, and optionally a signature to verify the authenticity of the commit to which it points. When using them, there is little difference between the two both will allow you to refer to a specific commit in a repository.Īn annotated tag creates an additional tag object in the Git repository, which allows you to store information associated with the tag itself. Git has two flavours of tags annotated and non-annotated. In other words, tags are immutable references. When it is, a commit will automatically update the master reference to point to that new commit in other words, branches are mutable references.Ī tag, on the other hand, is created to point to a specific commit and thereafter does not change, even if the branch moves on. What's the difference between tags and branches? The workspace is (almost always) associated with a branch, called master by default. A tag is like a branch, in that it identifies a specific commit with a descriptive label. The second, which we'll introduce here, is tags. When we switch between two branches, we're really using the descriptive label to identify a specific commit to switch to. The first, we've already seen, is branches. Git provides a couple of mechanisms for identifying changes by labels instead of by unique hash values. You can subscribe to the feed if you want to receive new instalments automatically. This week's Git Tip of the Week is about working with tags.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |