Export all user commits for multiple projects
Imagine you have a folder with all your project repos in, and you want to export all the commits you've made to each.
When run in your project directory, the below will go through each project directory, search for commits matching the given author, use oneline formatting and then dump this in a file called my_repo.log in the my_gitlogs directory under whatever path you wish.
find . -maxdepth 1 -type d -exec sh -c '(cd {} && git log --pretty=format:"%h %ad %an %s" --author="Pete Hamilton" --date=short > /PATH/my_gitlogs/${PWD##*/}.log)' ';'
The log format is like this:
71a7f33 2013-09-05 Pete Hamilton Clean up Admin stats endpoints
Written by Pete Hamilton
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#