I have the following 1-liner that I use to see who might be a good candidate for help with a peice of code:
git log --pretty=short . | grep ^Auth | sort | uniq -c | sort -nr
which lists authors in order of commits, it's crude but it works OK.
When I add it to my git config however, like this:
[alias]
guru=!git log --pretty=short . | grep ^Auth | sort | uniq -c | sort -nr
running
git guru
Gives different results to running it from the command line.
stuart@beavis(rp):~/git/apps$ git log --pretty=short . | grep ^Auth | sort | uniq -c | sort -nr
710 Author: dave <dave@b2368a2b-315f-46b9-a0b0-05934f827f41>
415 Author: pete <pete@b2368a2b-315f-46b9-a0b0-05934f827f41>
402 Author: craig <craig@b2368a2b-315f-46b9-a0b0-05934f827f41>
Compared to:
stuart@beavis(rp):~/git/apps$ git guru
859 Author: craig <craig@b2368a2b-315f-46b9-a0b0-05934f827f41>
813 Author: paul <paul@b2368a2b-315f-46b9-a0b0-05934f827f41>
798 Author: dave <dave@b2368a2b-315f-46b9-a0b0-05934f827f41>
As Stefan Näwe notes below, aliases run in the root of your repository, is there any way to run the command on the directory I'm in, or specify?