Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find Last 10 authors for a certain file in Git

What is the best (from performance point of view) way to find in Git the last 10 users who changed a certain file ?

For example I want to know the last 10 committers (not the last 10 commits) of file foo.txt

like image 241
astropanic Avatar asked Dec 12 '25 16:12

astropanic


1 Answers

I'd try something like this in *nix systems (w/ bash)

git log --format=%an foo.txt |awk ' !x[$0]++' |head -10
like image 133
Lorenzo Marcon Avatar answered Dec 14 '25 15:12

Lorenzo Marcon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!