Git Tags

Tags are used to mark a particular commit in your commit history. They are a git ref (reference) to a commit. Much of software project build and distribution is based on tags, e.g., GitHub Releases.

Tags are inexpensive to create, copy, and delete. We will only use lightweight tags.

The following assumes that you just committed and pushed the last commit that is part of v1a:

Goal Command Note
Create lightweight tag git tag v1a  
List tags git tag Should see v1a
Show tags in the log git log Shown in the log as "tag: v1a"
Push the tag to GitHub git push origin v1a By default, tags are not pushed to GitHub
Delete local tag git tag -d v1a Verify after by listing the tags
Delete tag at GitHub git push origin --delete v1a Local delete does not delete at GitHub

Once you create and push any tags, verify that the tag is there in the repository at GitHub.

Notes: