Skip to content

Instantly share code, notes, and snippets.

@michaelfeathers
Created October 4, 2012 10:19
Show Gist options
  • Save michaelfeathers/3832740 to your computer and use it in GitHub Desktop.
Save michaelfeathers/3832740 to your computer and use it in GitHub Desktop.
Descending sort of Ruby files in a repository by number of commits
git log --name-only --no-merges | grep \.rb$ | sort | uniq -c | sort -nr
@gvaughn
Copy link

gvaughn commented Oct 4, 2012

git log --name-only --no-merges | grep .rb$ | grep -v ^vendor | sort | uniq -c | sort -nr

@gvaughn
Copy link

gvaughn commented Oct 4, 2012

Lost the backslash. Trying again:
git log --name-only --no-merges | grep .rb$ | grep -v ^vendor | sort | uniq -c | sort -nr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment