How to set default “.gitignore” file for Android Studio project ✨

Taishi Yamasaki
1 min readDec 8, 2017

--

How do you deal with “.gitignore” file when you first create a project with Android Studio?
It is always annoying for me to edit it to make it work properly. I don’t know how many times I edit “.gitignore” file already. If you are software engineer, you love fixing the problem and making the process simpler, cleaner and more efficient in smart way right? So I looked into under the Android Studio templates directory.

Find the template file

First, you can find “project_ignore” file in the path below. (I’m a mac user.)

/Applications/Android Studio.app/Contents/plugins/android/lib/templates/gradle-projects/NewAndroidProject/root

Edit the template file

You can edit “project_ignore” file as you always do it. Here is my sample.

Have a good hacking day!👋

--

--