Find commits that modify file names matching a pattern in a GIT repository

You can use git log with a pathspec:

git log --all -- '*.wmv'

This will get you all commits which make changes to .wmv files. yes, this will descend into subdirectories too (but you have to surround your pathspec with single quotes, so it will be passed as is to git).

If you are only interested in commit hashes (scripting etc.) use the git rev-list machinery directly:

git rev-list --all -- '*.wmv'

Under Windows, it might be required to use double quotes instead of single quotes around the pathspec, e.g. "*.wmv"

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)