Android项目Git忽略文件

.gitignore 中需要配置的文件

# Built application files
*.apk
*.ap_
output.json

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/

# Gradle files
.gradle/
build/
/build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# Intellij project files
*.ipr
*.iws
*.iml
/.idea/
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/dictionaries
.idea/libraries

# Keystore files
# Uncomment the following line if you do not want to check your keystore files in.
*.jks

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

# Google Services (e.g. APIs or Firebase)
google-services.json

# Freeline
freeline.py
freeline/
freeline_project_description.json

Git 忽略文件不生效解决方法

1.清除缓存

git rm -r --cached .

2.添加文件

git add .

3.提交本地缓存

git commit -m 'commit .gitignore'

 

你可能感兴趣的:(Git)