You should add these rules to a global gitignore in order not to duplicate this file in every project you have.
https://help.github.com/articles/ignoring-files