我想让Git日志用户只有日期条件。由于在我们的CI/CD管道,一些提交自动添加,我们想要清除他们。
例如,我们希望排除下面的系统帐户,并在2022-10-01之后获取Git日志。
sachiko@XXX.co.jp
keiko@XXX.co.jp
iori@XXX.co.jp
…其他100个用户帐户<--我们的拾取目标
concourse@XXX.co.jp <--系统帐户,清除目标
git@localhost <--系统acount,清除目标
devXXXXau <--系统acount,清除目标
trial :
git log --date=iso --pretty=format:"[%ad] %h %an" --author='^(?!concourse@XXX.co.jp|git@localhost|devXXXXau).*$' --perl-regexp --after '2022/10/01'
result:
[2022-11-11 19:40:48 +0900] 463aab83 sachiko<E7><B8><B2><C2><80>--author='^(?!concourse@XXX.co.jp|git@localhost|devXXXXau).*$'
[2022-11-11 19:40:49 +0900] 463aab84 git@localhost<E7><B8><B2><C2><80>--author='^(?!concourse@XXX.co.jp|git@localhost|devXXXXau).*$'
[2022-11-11 19:40:56 +0900] 463aab85 iori<E7><B8><B2><C2><80>--author='^(?!concourse@XXX.co.jp|git@localhost|devXXXXau).*$'我们希望只收集用户日志,sachiko和iori,来清除所有的系统日志,但是到目前为止它还没有工作。
另外,我只想得到“2022-11-11 19:40:47 +0900 463 aab83 sachiko”,作者日期,提交散列,作者。
发布于 2022-11-17 07:44:28
由于@eftshift0 0和@Lazy Badger,我可以排除以下几个帐户;
git log --date=local --pretty=format:"[%ad] %h %an : %s" --after '2022/10/01' --author="\(concourse@xxxxx.co.jp\)\|\(devxxxxxxau\)\|\(git@localhost\)" --invert-grep希望能对某人有一点帮助。
https://stackoverflow.com/questions/74404311
复制相似问题