useGit API
    Preparing search index...

    Function createAnnotatedTag

    • Creates an annotated Git tag with a message.

      Annotated tags are stored as full objects in Git and typically include the tagger name, email, date, and a message.

      Parameters

      • tagName: string

        The name of the tag to create.

        "v1.0.0"
        
        "release-2024"
        
      • message: string

        The annotation message for the tag.

        "Initial stable release"
        
        "Production release for 2024"
        
      • opts: CreateTagOptions = {}

      Returns Promise<string>

      await createAnnotatedTag("v1.0.0", "Initial stable release")
      
      createAnnotatedTag("release-2024", "Production release for 2024")
      .then(output => console.log(output))
      .catch(error => console.error(error))
      await createAnnotatedTag(
      "v1.0.0",
      "Re-tagged after hotfix",
      { force: true }
      )

      1.0.0