Skip to content

Instantly share code, notes, and snippets.

@domgetter
Created November 7, 2015 09:18
Show Gist options
  • Save domgetter/f134453ed3ca9ee43940 to your computer and use it in GitHub Desktop.
Save domgetter/f134453ed3ca9ee43940 to your computer and use it in GitHub Desktop.
Prints out the directory listing for the most recent commit in a repository.
puts `git ls-tree HEAD -r -t -l`.split("\n").map {|l| tabs = l.scan('/').length; " "*tabs + l.split.last.split('/').last}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment