Each line in a .gitignore file specifies a pattern. When deciding whether to ignore a path, Git normally checks .gitignore patterns from multiple sources… https://git-scm.com/docs/gitignore
PATTERN FORMAT
- # – comment
- foo/ – will match a directory foo
- ! – negates the pattern
/**
-
matches everything inside.
Android studio default .gitignore:
.gradle /local.properties /.idea/workspace.xml /.idea/libraries .DS_Store /build /captures
Additional common patterns:
# Android Studio Navigation editor temp files .navigation/ # Android Studio captures folder captures/ # Gradle files .gradle/ build/ # Gradle Signing signing.properties trestle.keystore # Ignore Gradle GUI config gradle-app.setting # IntelliJ files /.idea/** .idea/** # built application files *.apk *.ap_ *.jar *.war *.ear !gradle/wrapper/gradle-wrapper.jar # lint folder lint # Files for the Dalvik VM *.dex # Java class files *.class # Generated files bin/ gen/ # Local configuration file (sdk path, etc) local.properties # Log Files *.log # Crashlytics plugin (for Android Studio and IntelliJ) com_crashlytics_export_strings.xml