Skip to content

Instantly share code, notes, and snippets.

@alexanderbird
Created April 30, 2020 15:59
Show Gist options
  • Save alexanderbird/e32ef71931e244b2a577825cb17896fc to your computer and use it in GitHub Desktop.
Save alexanderbird/e32ef71931e244b2a577825cb17896fc to your computer and use it in GitHub Desktop.
List the date that each file in the current directory & subdirectories was created. If you run this from the root of a large repo it will take a while.
OIFS="$IFS"
IFS=$'\n'
for file in `git ls-files`; do
echo "$(git rev-list HEAD "$file" | tail -n 1 | xargs git log -n 1 --date=short --pretty=format:%ad) $file"
done
IFS="$OIFS"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment