gitignore 是用于Git版本控制中忽略制定文件版本更新,比如bin和gen文件夹等
配置方法:
1、在GitHub上copy一份相应的配置,GitHub地址:https://github.com/github/gitignore
2、在GIT仓库根目录下创建.gitignore文件,例如你仓库的位置在”D:\MYGIT”位置,那么相应的位置为”D:\MYGIT.gitignore”。
Windows下创建.gitignore创建方法有两种:
1)创建txt文件,将文件(包含后缀名)重命名为”.gitignore.”,后面需要加上英文”.”字符,不然不能成功创建。
2)通过命令行创建,进入仓库根目录下输入命令”touch .gitignore”即可创建。
3、将配置文件copy复制到.gitignore文件中
# Built application files
*.apk
*.ap_
*.aab
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Gradle files
.gradle/
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
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
.idea/caches
# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore
# 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
# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md