Unfortunately, there is no way to do this automatically, except for the one Ted was talking about. However, I personally do not see this as a big drawback, because you can safely add your specific templates that are best suited for your project. To do this, do the following:
Go to File -> Settings and from there select Plugins . Click Browse repositories... and you can find a plugin called .ignore. Install it.
Now, to configure .gitignore for any project, in case you did not open the project, click Configure → Settings . If you have an open project, go to File -> Other Settings -> Default Settings… Now expand Version Control and click Ignore Files Support . You should be able to add a custom template for your .gitignore file there.
To use any template that you added there, simply right-click on .gitignore and click Add template… You can add your own specifications there, but many others are provided by default, so you don’t need to search Google for the .gitignore setting for the OS or language.
source share