Manage tags

更新时间:
复制 MD 格式

What is a tag

  • A tag is a reference to a specific point-in-time version. Tags typically mark important versions in a code repository, such as project milestones.

  • Git uses two main types of tags: lightweight tags and annotated tags.

  • For more information about Git tags, see Git Basics - Tagging in the Git documentation.

View tags

You can view tags from two locations: the Tags page and the Commits page.

Tags page

  1. In your code repository, go to the Tags page to view the tag list. Annotated tags display the tag name and can be expanded to view the description. Lightweight tags display only the tag name. On the Tags page, you will find two tabs at the top: Releases and Tags. Select the Tags tab to view all Git tags. The Create Tag button is in the upper-right corner. Each row in the list displays the tag name (e.g., v2.41.0), the corresponding commit hash, the tag description, and the creation time. The right side of each row provides a Compare button and a delete icon. Use the pagination bar at the bottom to browse all tags.

  1. In the upper-left corner, you can sort and filter tags by name.

Commits page

Go to your code repository and click any commit ID to open the commit details. You can view associated tag information in the basic information at the top of the page. On the Commits details page, the header shows the commit title (e.g., Git 2.41-rc2), author, creation time, and commit hash (e.g., 79bdd487). You can also view associated tags, such as v2.41.0 and v2.41.0-rc2, from the tag dropdown menu. The main content area shows a side-by-side diff of file changes. Deleted lines are highlighted in red on the left, and added lines are highlighted in green on the right. This lets you compare changes line by line.

Create a tag

By default, users with the developer role or higher can create tags.

  1. Go to the Tags page and click Create Tag.

  2. Enter a tag name, specify a source, provide a description, and then click Confirm.

Delete a tag

By default, users with the developer role or higher can delete tags.

  1. In the tag list, select the tag to delete.

  2. Click the Delete icon on the right side of the list.

  3. In the Confirm Deletion dialog box that appears, review the message and click OK.