This is more of an opinion rather than answer, but you shouldn't put any of your workspace-related files into the repository. Every developer has his own configurations, application and server stack and I don't need to know that you're using NetBeans (.nbproject directory) and you don't need to know that I'm using PHPStorm (.idea). Repository should contain only project-related files, eg.:
- source code,
- default configurations,
- templates,
- libraries,
- documentation,
- 3rd party configurations (Travis, Composer),
and so on.