Answers:
这不是唯一的方法,但是可以起作用:
git log --pretty="%H" --author="authorname" |
while read commit_hash
do
git show --oneline --name-only $commit_hash | tail -n+2
done | sort | uniq
或者,作为一行:
git log --pretty="%H" --author="authorname" | while read commit_hash; do git show --oneline --name-only $commit_hash | tail -n+2; done | sort | uniq
git log --pretty= --author=@abcd.com --name-only | sort -u | wc -l
在git repo中显示公司所有修改过的文件。
git log --pretty= --author=user@abcd.com --name-only | sort -u | wc -l
在git repo中按作者名称“ user”显示所有修改的文件。
--name-only似乎使输出仅是文件名。鉴于这一事实,有哪些选择--stat和--pretty=format:""成就?你能把他们排除在外吗?