O'Reilly logo

Continuous Integration, Delivery, and Deployment by Sander Rossel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tagging

One last issue I would like to discuss, which really comes in handy when releasing, is tagging. You can tag a commit for later reference. Tagging is mostly used to give a commit a version tag, so you can find it later. You will know exactly what commit represents version 1.0 or 1.1 of your software as that commit is tagged with that specific version.

There are two types of commits, lightweight and annotated. A lightweight tag is just that, a tag. An annotated tag keeps some extra information, such as a commit message, creation date, and the author of the tag. Creating a tag is really easy. Simply use git tag tag-name. For annotated tags, use the -a switch and specify a message. This will create a tag for your current commit:

git tag ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required