I am trying to exclude a file (db/irrelevant.php) from a Git diff. I have tried putting a file in the db subdirectory called .gitattributes>
db/irrelevant.php
db
.gitattributes>
Omg, drivers and awk to exclude a lousy file ? Since git 1.9 something you can:
git diff -- . ':(exclude)db/irrelevant.php' ':(exclude)db/irrelevant2.php'
Ah, elegance! See the quoted answer and for details this answer by @torek