On GitHub. Gitignore Template collection, there are various. Gitignore:https://github.com/github/gitignore
Own the. gitignore file for the project under Android Studio and added the Android.gitignore on GitHub
# OSX Files//mac os
. Ds_store
# Android Studio
*.iml
. idea
# Built Application files*.apk*.ap_# files for the Dalvik vm*.dex# Java class files*.class# Generated filesbin/gen/# Local Configuration file (SDK path, etc) local.properties# OSX files. ds_store# Android studio*.iml.idea# Gradle files.gradle/build/# Local configuration file (SDK path, etc) local.properties # Proguard folder generated by eclipseproguard/# Log Files*.log
Sometimes we find that adding a. gitignore file does not ignore the file we want to ignore, and the workaround is to clear the cache for the reason that Gitignore is not valid for the tracked file, and the file will appear in an untraceable form after the cache is cleared. And then re-add the commit again. The rules in the Gitignore file will work.
RM -R--'update. Gitignore'
Clear Cache Effective Method reference: Http://niltor.net/index.php/Home/Blog/showblog?id=5
The. Gitignore and Gitignore Invalid resolution for Android Studio