简体   繁体   中英

git log: exclude commits that only modify certain subfolder?

When writing the release notes for a new version of a project, sometimes it is interesting to distinguish which contributors are developers and which are just translators.

For this, in the case of gettext -based projects, one could simply use git log but just taking in account all the subfolders of a project which are not named po .

I've seen that git log accepts a path argument, but how to achieve the opposite? Supply a path to be discarded , instead of taken in account? Thanks

您可以排除名为po的文件夹,并按以下方式显示其他文件夹的所有协作者。

git log -- . '!po/*' --no-merges "$@" | grep ^Author: | sed 's/ <.*//; s/^Author: //' | sort | uniq -c | sort -nr

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM