Overview
Thetag() function is a flexible low-level utility for working with Git tags. It provides direct access to the git tag command with all its options.
Syntax
Parameters
The name of the tag to create or operate on.
Configuration options for the tag operation.
Returns
A promise that resolves with the command output.
Examples
List all tags
Create a lightweight tag
Create an annotated tag
List tags with options
Delete a tag using options
Notes
- For most use cases, consider using the higher-level functions like
createTag(),createAnnotatedTag(), ordeleteTag()instead - The function provides direct access to
git tagcommand options for advanced scenarios - When called without arguments, it lists all tags in the repository
Related
- createTag() - Create a lightweight tag
- createAnnotatedTag() - Create an annotated tag
- deleteTag() - Delete a tag
- getTags() - Get all tags as an array