Create a file called .gitignore

 

*.log         <- in this directory

**/*.log      <- in any sub directory

blah.*