Share this page

# Use tags

Tags specify significant points in a repository’s history such as releases and stable builds.

In this topic:

## Guidelines for using tags

You can use the following tags:

Lightweight tags | Temporary or personal tags attached to a Git commit that you can quickly create and delete. They are stored as metadata with the corresponding changeset in OpenText Dimensions CM.
Annotated tags | Used to identify project milestones such as when the application is ready for release. Annotated tags have a comment, creator, date, and timestamp. They are stored in OpenText Dimensions CM as baselines.

- Only tags for changesets that are being cloned are created. For example, if you are cloning to a depth of three changesets (`--depth=3`), and the fourth oldest changeset has a tag, that tag is excluded from the fetch.
- You cannot create annotated tags with topic streams.

For details about tags, see the Git documentation.

Back to top

## Create and push lightweight tags

You can use the Git Client to:

- Create lightweight tags.
- Push changes to OpenText Dimensions CM.
- Create new changesets.
- Store lightweight tag information as a property of a changeset.

Example:

1. Clone a stream:

   Copy code

       git clone dimensions://cmserver/cm_typical@dim14/qlarius/java_brancha_str .

2. Make changes to the code.

3. Commit the changes and create a lightweight tag called `mywork`:

   Copy code

       git commit –a –m “comment for my changes”
       git tag mywork

4. Push the lightweight tag to OpenText Dimensions CM:

   Copy code

       git push origin mywork

The `push` command:

- Delivers the code changes.
- Creates a new OpenText Dimensions CM changeset with the tag mywork.

Back to top

## Delete lightweight tags

You can remove lightweight tags from OpenText Dimensions CM changesets.

Example:

1. Delete the lightweight tag locally in your Git repository:
git tag –d mywork
2. Push the tag deletion to OpenText Dimensions CM:
git push --delete origin mywork

Back to top

## Create and push annotated tags

You can use the Git Client to:

- Create annotated tags.
- Push changes to OpenText Dimensions CM.
- Create new changesets.

- Create new baselines of streams.

Note: The user pushing the annotated tag requires the appropriate OpenText Dimensions CM privileges to create baselines.

Example:

1. Clone a stream:

   Copy code

       git clone dimensions://cmserver/cm_typical@dim14/qlarius/java_brancha_str .

2. Make changes to the code.

3. Commit the changes and create an annotated tag called rel2.1:

   Copy code

       git commit –a –m “comment for my changes”
       git tag –a rel2.1 –m “ready for release”

4. Push the annotated tag to OpenText Dimensions CM:

   Copy code

       git push origin rel2.1

The `push` command:

- Delivers the code changes.
- Creates a new OpenText Dimensions CM changeset.
- Create a new baseline of the stream at that point in time.

The annotated tag name is used as the baseline identifier, for example: QLARIUS:REL2.1

Back to top

## Delete annotated tags

You can delete annotated tags from OpenText Dimensions CM. If you delete a baseline directly from Dimensions CM using a client, the annotated tag is also deleted.

Note: The user pushing the annotated tag requires the appropriate OpenText Dimensions CM privileges to create baselines.

Example:

1. Delete the annotated tag locally in your Git repository:

   Copy code

       git tag –d rel2.1

2. Push the tag deletion to OpenText Dimensions CM:

   Copy code

       git push --delete origin rel2.1

This command deletes the baseline QLARIUS:REL2.1 from OpenText Dimensions CM.

Back to top

## List tags

Git has multiple methods to list tags and display the commits related to a tags. All methods are supported by the OpenText Dimensions CM Git Client.

Examples:

- To list lightweight and annotated tags:

  git tag –l

- To list all tags and the commits the tags point to:

  git show-ref --tags

- To show the details for a specific tag:

  git show rel2.1

Back to top

https://admhelp.microfocus.com Dimensions CM 8942
Tips to improve your search results... OpenText™ Dimensions CM Help Center OpenText™ Dimensions CM Help 25.2 All View Local Help Center View Online Help Center Version: