android - 首先提交 Android Studio 项目——应该遗漏什么?

标签 android git android-studio gitignore

我正在为一个新的 android 项目做我的初始提交。我对代码的状态很满意,但想知道要添加和提交哪些文件以及我应该删除哪些文件。

这是我的 .gitignore 内容:

# built application files
*.apk
*.ap_

# files for the dex VM
*.dex

# Java class files
*.class

# generated files
bin/
gen/

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

# Eclipse project files
.classpath
.project

# Proguard folder generated by Eclipse
proguard/

# Intellij project files
*.iml
*.ipr
*.iws
.idea/

这是我当前的 git 状态:

.gitignore
.gradle/
app/
build.gradle
build/
gradle/
gradlew
gradlew.bat
import-summary.txt
settings.gradle

最佳答案

我提交了除了本地内容之外的所有内容,这是我的 .gitignore:

*.iml
.gradle
/local.properties
/.idea
.DS_Store
/build
/captures
Dependency/*
/app/.idea/*
/app/.svn/*
/app/local.properties

关于android - 首先提交 Android Studio 项目——应该遗漏什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25693964/

相关文章:

java - 如何通过textview在屏幕上显示android中发生的生命周期事件

android - 泰米尔日历 View

android - 多个微调器上的 OnItemSelectedListener 不工作

java - git : Run dos2unix commands only on modified files using git status command

git - Git 来回 merge 后,为什么分支不在同一点?

java - 如何修复 java.lang.StringIndexOutOfBoundsException : length=225; regionStart=4; regionLength=-2

android - APK文件在磁盘上不存在

java - 无法设置App Engine测试环境

java - 从文件中读取而不关闭它?

Git:从提交复制到工作目录