Question: Given a git repo, show the files modified by a specific set of users, plus the last editor (from that set of users) of those files.
Potential solution:
git ls-files | xargs -n 1 git log -1 --author="example.com" --name-only --pretty=format:'%aN' --follow -p | paste -d";" - -
This will produce desired output (below) but it's slow:
<author_a>;<file_a>
<author_b>;<file_b>
<author_b>;<file_c>
...
Is there a faster/better way to do this?
You can make alias
for that so it will save you the typing or the copying of that line.
To make alias
you simply add alias
using git alias command or pasting it directly in your .gitconfig
file
Another thing you can do is modify this script
to suite your desired format and add it to your path, then add alias to this script in your git config.
for example if you want to call it git l
= "!bash -c 'source ~/.githelpers && pretty_git_log'"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With