astropanic
astropanic

Reputation: 10939

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

Upvotes: 3

Views: 96

Answers (1)

Lorenzo Marcon
Lorenzo Marcon

Reputation: 8169

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

git log --format=%an foo.txt |awk ' !x[$0]++' |head -10

Upvotes: 10

Related Questions