Skip to content

Instantly share code, notes, and snippets.

@rhcarvalho
Created November 5, 2016 19:29
Show Gist options
  • Save rhcarvalho/71eba6ee154590cc7f542e55386fe824 to your computer and use it in GitHub Desktop.
Save rhcarvalho/71eba6ee154590cc7f542e55386fe824 to your computer and use it in GitHub Desktop.
List old files in a Git repository by last modification date
git ls-tree -r --name-only HEAD | while read filename; do
echo "$(git log -1 --format="%ad" --date=short -- $filename) $filename";
done | sort | head -20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment