Search code examples
androidgitandroid-studioversioninggitignore

Should I version app/build files in Android Studio?


I'm new to Git and Android development and I could not find an answer to this question.

When I build a project in Android Studio a lot of files are created in the folder app/build.

I guess I don't need that files, but before ignoring them in the .gitignore, I would like to be sure to not mess my repo since from the first commit :D

I checked this question, but I cannot see in the example .gitignore the folder app/build.

Should I add it to my .gitignore?

P.S. I'm using Android Studio 2.2.3, if relevant


Solution

  • I guess I don't need that files, but before ignoring them in the .gitignore I would like to be sure to not mess my repo since from the first commit :D

    You don't need build files in your repo.

    Usually .gitignore file contains /build.

    I checked this question but I cannot see in the example .gitignore the folder app/build.

    You can place another one .gitignore file to app directory, the content of this file also contains /build.

    /project
         .gitignore
         /app
             .gitignore