列出他人提交的提交(即不是我)? [英] List commits made by others (i.e. not me)?
问题描述
是否有一种标准的方式来列出其他人(即不是我自己)在git仓库中提交的所有提交?
我试过了 git log --not --author = username
,但看起来 - 不是
只适用于修订版本。 git log
的手册页似乎没有提供反转谓词的方法,如 - author
。
(我在工作中使用了 git-svn
,并且想要一种方式来查看我的同事自从我上次运行 git svn rebase
,或者更一般地在最后一个 X
天。通常我知道我改变了什么,我只想看看哪些文件被他人触及/读取他们的提交日志消息/可能会查看有趣的补丁/等等)
编辑: 精制范围,我实际上对最近比自上次 git svn rebase
更感兴趣。 h2_lin>解决方案
这不是一个真正的解决方案,但是对于它的价值,你可以使用事实 - author c >使用正则表达式匹配。如果你的名字是Jefromi:
git log --author ='^ [^ J] \ | J [ ^ e] \ | Je [^ f]'#等等
这很糟糕,但它可能足以满足你的目的。 (如果没有其他人的名字以与你的名字相同的字母开头,则缩短)。
最近,除了使用分支来缩小范围( start..end
, ^ stop1 ^ stop2 branch
等),您可以使用 - since =< date>
选项。
Is there a standard way to list all the commits made by others (i.e. not myself) in a git repository?
I tried git log --not --author=username
, but it would appear that --not
only applies to revisions. The manpage for git log
doesn't appear to offer a way to invert predicates like --author
.
(I use git-svn
at work, and want a way to see what my colleagues have changed since I last ran git svn rebase
, or more generally in the last X
days. Generally I know what I changed, I just want to see which files have been touched by others / read their commit log messages / maybe review interesting patches / etc.)
Edit: Refined scope, I'm actually more interested in "recently" than "since last git svn rebase
".
This isn't a real solution, but for what it's worth, you could kludge something using the fact that --author
uses a regex match. If your name were, say, Jefromi:
git log --author='^[^J]\|J[^e]\|Je[^f]' # and so on
It's pretty crappy, but it might be good enough for your purposes. (And it's shorter if no one else's name starts with the same letters as yours.)
As for recently, besides using branches to narrow your range (start..end
, ^stop1 ^stop2 branch
, etc.), you can just use the --since=<date>
option.
这篇关于列出他人提交的提交(即不是我)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!