是否存在将“/”在一个混帐标签名称来创建分层/嵌套标签? [英] Are there issues with putting a "/" in a git tag name to create hierarchical/nested tags?

查看:109
本文介绍了是否存在将“/”在一个混帐标签名称来创建分层/嵌套标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在我们的git存储库上创建了一个标签2012/02/16。然后我们注意到,在Source Tree内部,2012和01被表示为可以整齐地打开和关闭以显示和隐藏标签的文件夹。有一个嵌套的标签层次结构似乎是组织标签而不是只有一个扁平列表的好方法。

We created a tag "2012/02/16" on our git repository. We then noticed that inside of Source Tree the 2012 and 01 were represented as folders which could neatly be opened and closed to reveal and hide the tags. Having a nested hierarchy of tags seems like a nice way to organize the tags instead of just having one flat list.

这样做有问题吗?

当我执行git ls-remote时,我看到以下内容:

When I do a git ls-remote I see the following entries:

8430572c89362b875109628c33a18e782aa38488    refs/tags/2012/02/16
d247e38159c8c4998bf8b555edfd7ffe7b945255    refs/tags/2012/02/16^{}

我不确定第二个标签末尾的^ {}字符是什么意思,我想确保我们偶然发现的这种行为不是我们不应该做的事情,它清理我们的标签。

I'm not sure what the ^{} characters at the end of the second tag mean and I want to make sure that this behavior we stumbled upon isn't something we should not be doing before we go and leverage it to clean up our tags.

我们在未嵌套标签上看不到^ {}字符。

We don't see the ^{} characters on our "un-nested" tags.

推荐答案

没问题,使用斜杠是标准做法,例如在git-flow规范中。您可以在手册页git-check-ref-format(1)中检查标记名的语法规则:
http://schacon.github.com/git/git-check-ref-format.html

No problem, using a slash is standard practice for example in the "git-flow" discipline. You can check the syntax rules for tag names in the manual page git-check-ref-format (1): http://schacon.github.com/git/git-check-ref-format.html

括号中的脱字符是git试图告诉你的那个标签,而不是你输入的内容。您可以使用手册页面gitrevisions(7)对其进行解释:
http:// schacon。 github.com/git/gitrevisions.html

The caret with brackets is something git is trying to tell you about that tag, not something you typed. You can interpret it using the manual page gitrevisions (7): http://schacon.github.com/git/gitrevisions.html

这篇关于是否存在将“/”在一个混帐标签名称来创建分层/嵌套标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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