`git ignore <filename>`. Simple as that.