rlopezo rlopezo -3 years ago 51
Git Question

Exclude specific files by extension from git log

I need to exclude specific files depending of its extension, my command now is this:

git log --author="author.name" --pretty=tformat: --numstat


What I should add to exclude for example all files with extension .ktr and .db_diagram?

Thank you!

Answer Source

With grep:

git log --author="author.name" --pretty=tformat: --numstat | grep -v -E '*\.(klr|db_diagram)$'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download