Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git - List files created by author

Tags:

git

logging

Is there a way to list files created by a specific author using Git? I also need to filter these results, either by filename (regex/pattern) or folder where they were created.

So what I'm looking for is a list of created (not updated) files by author without filename duplication and without commit messages.

like image 410
Vadorequest Avatar asked Jun 09 '14 14:06

Vadorequest


2 Answers

List all commits adding files, showing the commit author and the added files; then paste the author to the front of each file listed:

# 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}'
like image 148
jthill Avatar answered Nov 15 '22 22:11

jthill


try this

$ git whatchanged --author="yourAthor" --name-only

And also here you have some filters

http://gitref.org/inspect/

like image 5
Miktown Avatar answered Nov 15 '22 21:11

Miktown