如何删除以破折号开头的Git标签? [英] How to delete Git tag named starting with dash?

查看:67
本文介绍了如何删除以破折号开头的Git标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用命令删除名为 -d 的git标签名称 git标签-d -d ,但无法将其删除.

I tried deleting the git tag name which is named as -d using command git tag -d -d but couldn't able to delete it.

有什么想法吗?

推荐答案

git标签-d--d 是告诉* nix程序-之后的参数的常用方法-不是一个选项,而是一个位置参数.这样可以删除名为 -f 等的文件.

git tag -d -- -d is the usual way to tell a *nix program that the argument after -- is not an option but rather a positional argument. This is how you can remove files named -f and so on.

这篇关于如何删除以破折号开头的Git标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆