How to create a tag with a slash in the name

Is there a way to create a git tag with a slash in the name when I already have a similar view?

Suppose I have a tag "1.16.0" and I want to create a tag "1.16.0 / 1.0.0":

$ git tag "1.16.0/1.0.0"
error: 'refs/tags/1.16.0' exists; cannot create 'refs/tags/1.16.0/1.0.0'
fatal: refs/tags/1.16.0/1.0.0: cannot lock the ref
+4
source share
1 answer

It's impossible. See, the name of the tag (in fact, any link, the same goes for branches) is considered as the name of the file system object created in the folder of $GIT_DIR/refsyour repository. This object stores the hash commit to which the tag is bound.

With a tag foo, it's easy - a file foois created in $GIT_DIR/refs, nothing much to wonder about.

foo/bar, , : foo, - bar ( , -). :

[ ] / ()

, - - . , 1.16.0, 1.16.0/anything. 1.16.0/0.0.1, . - _.

+4

Source: https://habr.com/ru/post/1609514/


All Articles