2013-01-09 76 views

回答

0
git tag -l 
git tag --list 

应该做的所有的标签。但是一个标签的重量很轻,所以它不会存储谁制作的。

+1

带注释的标签不是轻量级的,应该有他正在寻找的信息,所以这些应该存储作者。 OP可能不知道他在用哪个。 –

+0

是真的。尽管我不认为git可以为您提供功能来轻松过滤作者的标签列表。 –

+0

不,他们不。我猜想像grep或甚至可能是python/perl会更好,但实际上需要找到标签的相关文件。 –

1

不是真的,除非您以某种方式签署或注释标签。但是,您可能希望制作不存储在refs/tags/下的“特殊”标签。有些系统为此做了瞬变标记 - gerrit是我所知道的,它创建了'refs/for /'和'refs/changes /'引用。您可以通过下裁判建立在其他目录裁判文件做到这一点:

$ git update-ref refs/special/first HEAD~4 
$ git update-ref refs/special/second HEAD~2 
$ git tag | grep first 
<nothing returned -- shows these are not tags> 
$ $ git log --oneline -n 2 special/first 
7c1d983 Merge branch 'pt/tcltk8513' into devel 
73cdc1e Merge pull request #72 from pointoforder/devel 
<it works!> 

而且 - 这些做gitk或git log --decorate露面。例如:

$ git log --graph --oneline --abbrev-commit --decorate -n10 
* 53e28dd (HEAD, origin/master, master) Installer: Continue the idea of d5f2 
* 0433db0 shell prompt should not beep and only show MSYSTEM when non-standa 
* 947ccf6 (refs/special/second) Merge branch 'devel' of 
|\ 
| * 759a59f Bash PS1: Correctly enclose nonprintable sections 
| * 4e4e3f3 Bash PS1: Split up PS1 into small components 
| * 707197e Bash PS1: refactor code for better readability 
* | 6bf64a4 Replace 'devel' with 'master' 
* | 7c1d983 (refs/special/first) Merge branch 'pt/tcltk8513' into devel 
|\ \ 
| * | cc9382f (pt/tcltk8513) Update tk to version 8.5.13 
| * | 31fbf2c Update tcl to version 8.5.13 

所以,你可以创建一些别名,使这些对你有用,简单易用。