Created
June 20, 2014 16:07
-
-
Save caseysoftware/ff633fc0640635ed8f84 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log --name-only | grep php --exclude=trunk | sort | uniq -c | sort -nr | head -n 25 > churn.txt | |
This one looks like an odd ball but what it does is: | |
- looks at the git log file, retrieving just the filenames; | |
- greps to extract those filenames, excluding anything from the old SVN /trunk structure; | |
- sorts the list of files to get the duplicates together; | |
- eliminates the duplicates but keeps a count of them; | |
- resorts the file names by that count; and | |
- retrieves the top 25 entries. | |
It's a variant of Katrina Owen's one-liner here: https://twitter.com/kytrinyx/status/358065717179973634 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should tweak the "grep php" part to use file extensions that are relevant to your code.