1

I already have tag with name of "V1.8/INTERNAL", Then I'm trying to create the new tag with name of "V1.8" by using following command.

C:\Program Files\Git\bin\git.exe -C D:\IOT_GIT\WinPkg tag -a  V1.8 3b87e27 -m  "" --force

But, I'm getting the following error,

fatal: cannot lock ref 'refs/tags/V1.8': 'refs/tags/V1.8/INTERNAL' exists; cannot create 'refs/tags/V1.8'

When I saw in TortoiseGit the new tag created successfully. I don't know why this error is coming while creating that new tag.

Venkatesh
  • 171
  • 1
  • 1
  • 10
  • It seems /internal is not recognized as part of tag but as subfolder. Thus git thinks v1.8 exist. – Christoph Jun 09 '18 at 12:30
  • Possible duplicate of [How to create tag with forward slash in its name](https://stackoverflow.com/questions/32849840/how-to-create-tag-with-forward-slash-in-its-name) – phd Jun 09 '18 at 14:29

1 Answers1

1

A possible workaround would be to adopt different naming convention for:

  • namespace tags (for instance: 1.8/INTERNAL)
  • regular tags (v1.8)

That way, you avoid having a tag name which is the same as a tag namespace (translated as a folder withing refs)

You can rename you existing V1.8/INTERNAL tag, then add your regular V1.8 tag.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250