Sample Header Ad - 728x90

how to filter git commits only if certain directories were changed

-1 votes
2 answers
188 views
I need to filter commits based on directory changes, for example I need to get a list of commits only if the commit made a change in a certain directory. I have tried the path filter glob option mentioned below. but this will include any commit that had a change in the specified directory even if any other file was changed as part of the commit. git log --pretty=format:'%H %s' -- \apps/web*/* I need to find a way so that only commits that specifically change files in those directories and no other changes are filtered out.
Asked by xerxes (359 rep)
May 8, 2025, 12:02 AM
Last activity: May 8, 2025, 10:40 AM