Skip to content

Instantly share code, notes, and snippets.

@coridrew
Forked from caseysoftware/churn.sh
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coridrew/a3834a1240beb9570ebf to your computer and use it in GitHub Desktop.
Save coridrew/a3834a1240beb9570ebf to your computer and use it in GitHub Desktop.
git log --name-only | grep xaml | sort | uniq -c | sort -Descending > xaml-files-by-tfs-commit-count.txt
What it does:
- looks at the git log file, retrieving just the filenames;
- greps to extract xaml filenames;
- 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
- writes the list to a txt file named xaml-files-by-tfs-commit-count.txt
Note: This works in PowerShell.
This is a variant of the churn gist by Keith Casey (https://gist.github.com/caseysoftware/ff633fc0640635ed8f84), which is 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