Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't I create a lightweight Git tag?

I cannot create a lightweight tag in Git, only annotated (as I understand).

I use the command:

git tag v15.0

This should create a lightweight tag without any metadata, but instead it asks me for a message, like for an annotated tag. It opens VS Code (because I have this setting), and requires me to write a message.

Even if I leave the message empty, I get an error that the message is empty and the tag will not be created.

As I work in Warp (AI terminal), it even suggests to use -m or -a options.

I thought maybe the tag was created anyway, so I checked:

git tag
git show v15.0

But the tag is not there.

I also tried:

git config --get alias.tag

It does not return anything. From what I found on Google, that means everything should be fine — but it's not.

What's happening?

like image 409
Vladislav Yarko Avatar asked Oct 23 '25 14:10

Vladislav Yarko


1 Answers

welcome to the community! As a quick suggestion, whenever troubleshooting issues, try to remove any noise - AI tools included - as this kind of noise only creates unwanted friction.

Also, when troubleshooting GIT (or any tool), it's always helpful to include any configs you might have in place and GIT version. Moreover, as a widely used OSS, it is also useful to tell which version of GIT you got and where did you get that binary from.

Using the GIT manual and without any further information, I suspect you have auto-sign enabled. If this is the case, then your tags will be annotated by default.

like image 174
Eduardo Costa Avatar answered Oct 26 '25 05:10

Eduardo Costa



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!