git标签组或stackoverflow类型标签 [英] git label groups or stackoverflow type tagging

查看:150
本文介绍了git标签组或stackoverflow类型标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法为某种类型的git commit使用某种标签?它看起来不像 git-tag 是我想要的,但更像是stackoverflow类型的标记。

Is there a way to use some sort of label for a type of git commit? It doesn't look like a git-tag is what I want, but something more like stackoverflow type tagging.

commit 1   <--  FIX            "Fixed bug 1"
commit 2   <--  SPECIAL_NEED   "1 hour on out of scope work"
commit 3   <--  FIX            "Fixed bug 2"
commit 4   <--  FIX            "Fixed bug 3"
commit 5   <--  SPECIAL_NEED   "2 hours on out of scope work"

然后,我需要查看标记为SPECIAL_NEED的提交列表和消息。

Then later I need to see the list of commits and their messages that are labeled as SPECIAL_NEED.

commit 2   <--  SPECIAL_NEED   "1 hour on out of scope work"
commit 5   <--  SPECIAL_NEED   "2 hours on out of scope work"

谢谢

Thanks

推荐答案

只需将 SPECIAL_NEED 一词添加到您的提交消息中,并使用

Just add the word SPECIAL_NEED to your commit message and search for it with

git log --grep=SPECIAL_NEED

这篇关于git标签组或stackoverflow类型标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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