How to never add WebStorm .idea folder to git ever again
Frequently when you work with an open-source repository you might accidentally commit your .idea folder to it. Maintainers of these repositories frown upon you changing their holy .gitignore file to prevent this problem. They don't want to hear about your crazy ideas of using a closed-source, commercial, and paid-for IDE.
There is a simple trick to help that I wish I discovered years ago.
The steps are very simple:
1) Create a global .gitignore file:
2) adding the '.idea' line to it in any way you want, but preferably with your expensive IDE:
3) and then configure git to use it:
That's it! You will never have to feel like a sapper on a minefield again.
Let me know if you have any questions or thoughts in the comments below.