How do I limit 'git ls-tree' to certain filetypes?

by Kari Cowan   Last Updated July 11, 2019 18:00 PM - source

I need to generate a list of all the images and css files with the modified dates, from a commit, for example.

git ls-tree -r --name-only HEAD | while read filename; do
  echo "$(git log -1 --format="%ad" -- $filename) $filename"

How would I modify this to just return jpg, gif, png, and css files?

Related Questions

Append modified dates to files in directory

Updated November 30, 2017 11:00 AM