Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change default gitignore file when creating a new project

Is there a way to change the default file .gitignore that Android Studio creates when creating a new android project? I searched for it in the Settings but could not find anything.

like image 911
AlvaroSantisteban Avatar asked May 04 '15 15:05

AlvaroSantisteban


1 Answers

Unfortunately, there is no way to do that automatically, besides the one Ted has mentioned. However, personally, I don't see this as a big downside, because you can thus safely add your specific templates that fit best to your project. To be able to do this, do the following:

Go to File -> Settings and from there highlight Plugins. Click on Browse repositories... and you should be able to find the plugin entitled .ignore. Install it.

Now to configure a .gitignore for any project, in case you have no project opened, click on Configure -> Settings. In case you have an open project, go to File -> Other Settings -> Default Settings…. Now expand Version Control and click on Ignore Files Support. You should be able to add a custom user template of your .gitignore-file there.

To use any template you've added there, just right click on your .gitignore and click on Add template…. There you'll be able to add your custom specifications, however, many others are given by default, so you don't need to do a google search for an OS or language specific .gitignore configuration.

like image 183
NaCl Avatar answered Oct 24 '22 22:10

NaCl