Adam Lee
Adam Lee

Reputation: 25748

How to create some tags under a special category?

I saw someone could create tags which are classifies into different folders in some tools like sourcetree.

I am wondering how to create the tags with folders

folder1,tag1,tag2

Upvotes: 0

Views: 87

Answers (2)

CodeWizard
CodeWizard

Reputation: 142174

Its recommended to use annotated tag instead of regular tag.

You simply add the -a as flag to the tag and the tag will include the same metadata as in commit. (committer, author, date, message etc)

enter image description here

Upvotes: 0

Simone Carletti
Simone Carletti

Reputation: 176412

Tag folders don't exists in git. However, some tools use the convention to consider whatever is before a / in the reference name as a folder or path. This applies to references in general, therefore tags and branches.

You can use:

$ git tag folder1/tag1

to create a "tag1 with folder1".

Upvotes: 1

Related Questions