Android项目配置gitignore 的方法

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lsf1025995457/article/details/52050012

gitignore 是用于GIT版本控制中忽略制定文件版本更新,比如bingen文件夹等。


配置方法:

1、GitHubcopy一份相应的配置,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文件中


Android.gitignore配置内容:


# Built application files
*.apk
*.ap_
# 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/libraries
# Keystore files
*.jks




猜你喜欢

转载自blog.csdn.net/lsf1025995457/article/details/52050012