如何设置在Android Studio中使用Windows和Linux的git repo(并使用gradle) [英] How to set up a git repo that works on Windows and Linux in Android Studio (and using gradle)
问题描述
我想处理Windows机器和Mint机器上的代码。
该项目在Android Studio中,并使用Gradle构建。
我应该在git repo中检查多少项目?我是否提交iml和gradle文件?我看到有一个local.properties说它不应该犯。
您应该为Android定义并提交适当的 .gitignore
文件工作室(在我看来也是IntelliJ / Eclipse)。 .gitignore
告诉你什么样的文件不需要git来跟踪。这是Android项目的很多例子之一:
#Eclipse
.project
.classpath
.settings
.checkstyle
#IntelliJ IDEA
.idea
* .iml
* .ipr
* .iws
classes
gen-external-apklibs
#Gradle
.gradle
build
#Maven
target
release.properties
pom.xml。*
#Ant
bin
gen
build.xml
ant.properties
local.properties
proguard.cfg
proguard-project.txt
#其他
.DS_Store
tmp
来自此要点。此外,你应该看看谷歌回购2013年是什么。还有一个很好的例子 .gitignore
(参考)。
I want to work on code on my Windows machine and Mint machine.
The project is in Android Studio and is built using Gradle.
How much of the project should I check into the git repo? Do I commit the iml and gradle files? I see there is a local.properties that says it should not be committed.
You should define and commit a proper .gitignore
file for Android Studio (and in my opinion for IntelliJ/Eclipse too). The .gitignore
tells you what kind of files you don't want git to track. This is one of many examples for Android projects:
# Eclipse
.project
.classpath
.settings
.checkstyle
# IntelliJ IDEA
.idea
*.iml
*.ipr
*.iws
classes
gen-external-apklibs
# Gradle
.gradle
build
# Maven
target
release.properties
pom.xml.*
# Ant
bin
gen
build.xml
ant.properties
local.properties
proguard.cfg
proguard-project.txt
# Other
.DS_Store
tmp
It is from this gist. In addition you should look on Google repo where iosched 2013 is. There is also a nice example of .gitignore
(reference).
这篇关于如何设置在Android Studio中使用Windows和Linux的git repo(并使用gradle)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!