Skip to main content
Version: 24.3.x

ALTER TAG Preview

Change the reference that the tag points to.

Syntax
ALTER TAG <tag_name>
ASSIGN { REF[ERENCE] | BRANCH | TAG | COMMIT } <identifier>
[ IN <source_name> ]

Parameters

<tag_name> String

The name of the tag that you are assigning a new reference to.


ASSIGN { REF[ERENCE] | BRANCH | TAG | COMMIT } <identifier> String

Specifies a reference to assign a tag from.

  • REF: Identifies a reference, which can be a branch, another tag, or a commit.
  • BRANCH: Identifies a branch reference where the specified tag is assigned to.
  • TAG: Identifies a tag reference where the specified tag is assigned to.
  • COMMIT: Identifies a commit reference where the specified tag is assigned to. Commit hashes must be enclosed in double quotes (for example, “ff2fe50fef5a030c4fc8e61b252bdc33c72e2b6f929d813833d998b8368302e2”).

IN <source_name> String   Optional

The name of the source that you want to assign a tag. If not specified, the current source in the query context is used.

Examples

Assign the tag to a specific commit
ALTER TAG myTag
ASSIGN COMMIT "c7a79c74adf76649e643354c34ed69abfee5a3b070ef68cbe782a072b0a418ba"
Assign the tag to a specific tag
ALTER TAG myTag
ASSIGN TAG tag1
Assign the tag to a specific branch
ALTER TAG myTag
ASSIGN BRANCH myBranch
IN mySource
Assign the tag to a specific reference
ALTER TAG myTag
ASSIGN REF tag2