What Are Tags?

Tags attach a name to a specific commit — commonly used for release version numbers.

Create a Tag

Lightweight Tag

git tag v1.0.0
git tag -a v1.0.0 -m "Release version 1.0.0"

Tag a Past Commit

git log --oneline
git tag -a v1.0.0 COMMIT_ID -m "Release version 1.0.0"

View Tags

git tag              # List all tags
git tag -l "v1.*"    # Filter by pattern
git show v1.0.0      # Tag details

Push Tags to Remote

git push origin v1.0.0        # Push a specific tag
git push origin --tags        # Push all tags

Delete Tags

git tag -d v1.0.0                    # Delete local tag
git push origin --delete v1.0.0      # Delete remote tag

Create a GitHub Release

  1. Go to the repository on GitHub
  2. “Releases” → “Create a new release”
  3. Select a tag or type a new tag name
  4. Add release notes → “Publish release”

Common Pitfalls

  • Tags don’t push automatically — you must push them explicitly
  • Annotated tags store author, date, and message; lightweight tags do not
  • Semantic versioning (v1.0.0) is the standard convention

You can also trigger a GitHub Actions workflow on tag push. See GitHub Actions: Basic Auto-Deploy Setup.

  • Fiverr - Find freelance developers and tech experts