When creating a new project with Android Studio and also creating a new git repository, there are quite a few untracked files present:
$ git status
On branch master
No commits yet
Untracked files:
(use "git add <file>..." to include in what will be committed)
.gitignore
.idea/
app/
build.gradle
gradle.properties
gradle/
gradlew
gradlew.bat
settings.gradle
nothing added to commit but untracked files present (use "git add" to track)
Which of these should I track?
Obviously I'd want to track everything in app/src
. But should I track everything in app
as well?
app/build.gradle
app/libs/
app/proguard-rules.pro
app/src/
I tend to say yes.
For the .idea/
folder I already found a discussion here.
The .gitignore
file I think I'd like to track as well.
That leaves the gradle files. Which of these are project specific (should be tracked) and which are environment specific (should not be tracked)?
My goal is for git status
to show no untracked files (thus, everything not tracked should be ignored).