> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/code-repository/use-harness-code/collaborate-and-develop/tag.md).

# Tag

With Harness Code, you can create tags in the Harness Code UI or you can [clone your repo](/code-repository/use-harness-code/collaborate-and-develop/clone-repos.md) and create tags with command line Git, IDEs, or other Git tools.

Tags you see in the Harness Code UI exist in your remote repositories. If you're working from a [local clone](/code-repository/use-harness-code/collaborate-and-develop/clone-repos.md), you need to push your tags to the remote to see those tags in Harness Code.

This topic explains how to work with tags in the Harness Code UI. For details about tagging with command line Git, an IDE, or another local Git tool, refer to the documentation for your preferred tool.

### Create a tag <a href="#create-a-tag" id="create-a-tag"></a>

1. When viewing a repository in Harness Code, go to **Tags** and select **New Tag**.
2. Enter a tag **Name**.
3. Select the branch or tag to base the tag on.
4. Enter a **Description**. Descriptions are required for tags created in the Harness UI because they are annotated tags. If you want to create lightweight tags, use command line Git.
5. Select **Create Tag**.

On the **Tags** page, you will see your **Tag**, and associated **Description**, **Commit**, **Tagger**, and **Creation date**.

### Inspect a tag <a href="#inspect-a-tag" id="inspect-a-tag"></a>

When viewing a repository in Harness Code, there are several ways you can inspect the files and commits associated with a tag:

* Go to **Tags** and select the name of the tag that you want to inspect. You're redirected to the **Files** page with the selected tag as the current context.
* Go to **Commits**, select the default branch name to open the branch/tag dropdown menu, select **Tags**, and then select a tag. The **Commits** page updates to show the commit history for the selected tag.
* Go to **Files**, select the default branch name to open the branch/tag dropdown menu, select **Tags**, and then select a tag. The **Files** page updates according to the context of the selected tag.

### Create a branch from a tag <a href="#create-a-branch-from-a-tag" id="create-a-branch-from-a-tag"></a>

You can create branches from tags.

1. When viewing a repository in Harness Code, go to **Tags**.
2. Locate the relevant tag, select **More options** (⋮), and then select **Create Branch**.
3. Enter a branch **Name**.
4. Select **Create Branch**.

### Delete a tag <a href="#delete-a-tag" id="delete-a-tag"></a>

{% hint style="warning" %}
You can't recover tags that are deleted from Harness Code.
{% endhint %}

1. When viewing a repository in Harness Code, go to **Tags**.
2. Select **More options** (⋮) next to the tag you want to delete, and select **Delete Tag**.
