Skip to content

Instantly share code, notes, and snippets.

@yaymukund
Created September 17, 2013 16:31
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save yaymukund/43b72920320ffecd30ad to your computer and use it in GitHub Desktop.
# git ls-files - Get me all the tracked files in the repo.
# xargs -I file sh -c ' echo $(...) file' - For each file, echo a subcommand appended by the filename.
# git log -1 --format=%ct file - Get the last-commit date for a file.
# sort -n - sort the output!
# > files-with-last-commit-dates - Write it to another file.
git ls-files | xargs -I file sh -c 'echo $(git log -1 --format=%ct file) file' | sort -n > files-with-last-commit-dates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment