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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With