``.idea`` is specific to your local setup, not to the project (and ``composer.phar`` too). So you should use a local exclude rule (or a global ignore file) instead of putting it in the ``.gitignore`` of the project: https://help.github.com/articles/ignoring-files