useGit API
    Preparing search index...

    Function createTag

    • Creates a lightweight Git tag.

      Parameters

      • tagName: string

        The name of the tag to create.

        "v1.0.0"
        
        "hotfix-1"
        
      • opts: CreateTagOptions = {}

      Returns Promise<string>

      await createTag("v1.0.0")
      // Same as: git tag v1.0.0
      createTag("hotfix-1")
      .then(output => console.log(output))
      .catch(error => console.error(error))
      await createTag("v1.0.0", { force: true })
      // Same as: git tag -f v1.0.0

      1.0.0