Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.vers.sh/llms.txt

Use this file to discover all available pages before exploring further.

vers repo tag create

Create a tag inside a repo that points to a specific commit. Tags are movable named pointers, think latest, v1.2.0, staging, known-good.

Synopsis

vers repo tag create <repo-name> <tag-name> <commit-id>
vers repo tag create <repo-name> <tag-name> <commit-id> --description "text"

Description

Creates a new tag inside the given repository pointing at the commit. The tag is unique per-repo; you can’t have two tags with the same name in the same repo (but my-app:latest and other-app:latest coexist fine). Tag names: 1-128 characters, letters, digits, hyphens, underscores, dots.
The commit must be owned by your org. You cannot tag another org’s commit, even if you can see it through a public repo. The way to “import” someone else’s commit is vers repo fork, which re-commits it under your ownership.

Options

OptionDescription
--description, -dOptional description of what this tag represents

Examples

Tag the result of a commit

vers commit
# ✓ Commit c7e4a2f1-… created

vers repo tag create my-app latest c7e4a2f1-…
# ✓ Tag created → my-app:latest

Tag with a description

vers repo tag create my-app known-good c7e4a2f1-… \
    -d "Last build that passed the integration suite"

Chain from a previous tag lookup

# Move a curated snapshot: look up one tag's commit, point another tag at it
COMMIT=$(vers repo tag get my-app staging --format json | jq -r .commit_id)
vers repo tag create my-app production "$COMMIT" -d "Promoted from staging"

Error Cases

Repository not found

vers repo tag create ghost latest c7e4…
# Error: repository not found

Commit not found or not yours

vers repo tag create my-app latest 00000000-…
# Error: commit not found
# or: forbidden   (if the commit exists but your org doesn't own it)
Solution for “forbidden”: you’re trying to tag someone else’s commit. Use vers repo fork instead.

Tag already exists

vers repo tag create my-app latest c9e4…
# Error: tag already exists in repository
Solution: use vers repo tag update to move the existing tag to a new commit, or delete it first with vers repo tag delete.

Invalid tag name

vers repo tag create my-app "my tag" c7e4…
# Error: Tag name can only contain alphanumeric characters, hyphens, underscores, and dots

See Also