有没有办法列出特定作者使用Git创建的文件?我还需要通过文件名(正则表达式/模式)或创建它们的文件夹来过滤这些结果。
所以我正在寻找的是作者创建的(未更新的)文件列表,没有文件名重复和提交消息。
jth*_*ill 14
列出所有提交添加文件,显示提交作者和添加的文件;然后将作者粘贴到列出的每个文件的前面:
# add `--author=pattern` to the log arguments to restrict by author
# add anything you like to the `--format=` template
# add any restrictions you like to the `/^A\t/` selector in the awk,
# ... say /^A\t/ && /\.c$/ { etc.
git log --name-status --diff-filter=A --format='> %aN' \
| awk '/^>/ {tagline=$0}
/^A\t/ {print tagline "\t" $0}'
Run Code Online (Sandbox Code Playgroud)
小智 5
尝试这个
$ git whatchanged --author="yourAthor" --name-only
Run Code Online (Sandbox Code Playgroud)
这里还有一些过滤器