2015-11-28 6 views
15

मैं हाल ही में एक Android प्रोजेक्ट बनाया लेकिन यह मेरी पहली बार एंड्रॉयड स्टूडियो के साथ काम करने के लिए है, मैं एक Git फ़ोल्डर में परियोजना रखा दूर से Git के माध्यम से एक और डेवलपर के साथ सक्षम काम होने के लिए और मैं उस डिफ़ॉल्ट पायाआदर्श एंड्रॉयड स्टूडियो gitignore फ़ाइल

*.iml 
.gradle 
/local.properties 
/.idea/workspace.xml 
/.idea/libraries 
.DS_Store 
/build 
/captures 

मैं बस सोच यह सक्षम काम दूरस्थ रूप से साथ होने के लिए आदर्श gitignore फ़ाइल है: .gitignore फ़ाइल निम्न शामिल हैं? या मुझे इससे कुछ फाइलों को संपादित या निकालना है ?!

+1

की संभावित डुप्लिकेट ([एक Android स्टूडियो परियोजना के लिए मेरी .gitignore में क्या होना चाहिए?] http://stackoverflow.com/questions/16736856/what-should-be-in-my-gitignore-for-an-android-studio-project) – RogueBaneling

उत्तर

39

मेरे लिए, आदर्श gitignore फ़ाइल है:

### Android ### 
# Built application files 
*.apk 
*.ap_ 

# Files for the Dalvik VM 
*.dex 

# Java class files 
*.class 

# Generated files 
bin/ 
gen/ 

# 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 Patch ### 
gen-external-apklibs 


### Java ### 
*.class 

# Mobile Tools for Java (J2ME) 
.mtj.tmp/ 

# Package Files # 
*.jar 
*.war 
*.ear 

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 
hs_err_pid* 


### Intellij ### 
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio 

*.iml 

## Directory-based project format: 
.idea/ 
# if you remove the above rule, at least ignore the following: 

# User-specific stuff: 
# .idea/workspace.xml 
# .idea/tasks.xml 
# .idea/dictionaries 

# Sensitive or high-churn files: 
# .idea/dataSources.ids 
# .idea/dataSources.xml 
# .idea/sqlDataSources.xml 
# .idea/dynamic.xml 
# .idea/uiDesigner.xml 

# Gradle: 
# .idea/gradle.xml 
# .idea/libraries 

# Mongo Explorer plugin: 
# .idea/mongoSettings.xml 

## File-based project format: 
*.ipr 
*.iws 

## Plugin-specific files: 

# IntelliJ 
/out/ 
/captures 

# mpeltonen/sbt-idea plugin 
.idea_modules/ 

# JIRA plugin 
atlassian-ide-plugin.xml 

# Crashlytics plugin (for Android Studio and IntelliJ) 
com_crashlytics_export_strings.xml 
crashlytics.properties 
crashlytics-build.properties 

इसके अलावा, आप भयानक सेवा का उपयोग कर सकते हैं: https://www.gitignore.io/

+0

'* .class' प्रविष्टि एक बार से अधिक परिभाषित किया गया है :) –

संबंधित मुद्दे