Steps to exclude .idea folder globally in phpstorm:
Create this file:
Add this contents:
Now in phpstorm open the terminal panel (command line shell) and type:
Next restart phpstorm. Now if you clone a new project it will never bother you about the .idea folder.