concept tag in category git

appears as: tags, A tag, tag, tags, tag
Git in Practice

This is an excerpt from Manning's book Git in Practice.

In figure 1.3, you can see the main Git objects we’re concerned with: commits, blobs, and trees. There’s also a tag object, but don’t worry about tags until they’re introduced in technique 36. Figure 1.2 showed an example of a commit object and how it stores metadata and referenced file contents. The file-contents reference is actually a reference to a tree object. A tree object stores a reference to all the blob objects at a particular point in time and other tree objects if there are any subdirectories. A blob object stores the contents of a particular version of a particular single file in the Git repository.

Technique 36 Creating a tag: git tag

Remember refs from section 1.7? A tag is another ref (or pointer) for a single commit. Tags differ from branches in that they’re (usually) permanent. Rather than pointing to the work in progress on a feature, they’re generally used to describe a version of a software project.

For example, if you were releasing version 1.3 of your software project, you’d tag the commit that you release to customers as v1.3 to store that version for later use. Then if a customer later complained about something being broken in v1.3, you could check out that tagged commit and test against it, confident that you were using the same version of the software that the customer was. This is one of the reasons you shouldn’t modify tags; once you’ve released a version to customers, if you want to update it, you’ll likely release a new version such as 1.4 rather than changing the definition of 1.3.

Listing 5.15. Output: tag describe
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest