It's not possible. See, the name of tag (any reference, in fact; the same goes with branches) is treated as the name of the file system object, created in $GIT_DIR/refs
folder of your repository. This object stores the hash commit the tag is attached to.
With tag foo
, it's easy - file foo
is created in $GIT_DIR/refs
, nothing special to wonder about.
With tag foo/bar
, however, it's a bit more complicated: now folder foo
is created, having just a single file - bar
(again, with the hash commit). Quoting the docs:
[reference names] can include slash / for hierarchical (directory) grouping
The problem is, it's not possible to have two objects - file and folder - with the same name. So if you already have 1.16.0
tag, you won't be able to work with 1.16.0/anything
. One obvious solution is transforming that initial tag into something like 1.16.0/0.0.1
, then proceeding with your original intent. Or you can just replace slash with -
or _
.