Use [global gitignore](https://help.github.com/articles/ignoring-files).