等同于:git log --exclude-author? [英] equivalence of: git log --exclude-author?
问题描述
在工作中,我们有一个git repo,其中大部分提交都是bot用户自动提交的。有时候我更喜欢从该回购库中查看git日志,但没有看到自动提交。我猜它可能被描述为倒过来的git log --author或者git log --exclude-author = botuser,如果这个选项存在的话。
git log --format =%H%aE现在我做以下事项,简化为bash别名。 | grep -v -F botuser @ domain |同时阅读哈希邮件;做git log -1 $ hash;回声;完成|减去
我的问题是,如果我想完成什么更少的解决方案?
从 https://coderwall.com/p / tzdzwa :
git log --perl-regexp --author ='^((?! excluded- *)$'
这对我很有用。
如果您不想在每次执行时指定 - perl-regexp
:
git config --global grep.patternType perl
At work we have a git repo where the majority of all commits are automated commits by a bot user. There are times when I prefer to view a git log from that repo, but without seeing the auto commits. I guess it could be described as an inverted "git log --author" or a "git log --exclude-author=botuser", if such as option had existed.
Currently I do the following, shortcuted to a bash alias.
git log --format="%H %aE" | grep -v -F botuser@domain | while read hash email; do git log -1 $hash; echo; done | less
My question is if there is a less hackish solution to what I want to accomplish?
From https://coderwall.com/p/tzdzwa :
git log --perl-regexp --author='^((?!excluded-author-regex).*)$'
This worked for me.
If you don't want to specify --perl-regexp
every time you can do:
git config --global grep.patternType perl
这篇关于等同于:git log --exclude-author?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!