简体   繁体   中英

Git: what to write into .gitignore file for this kind of repository?

What to put into .gitignore if the repo is a folder containing a set of different projects? they are Android Studio's, Maven's and developed on many OS.

After a research I think to put these lines, please tell me if there are mistakes or you have better ideas:

 **/*~
 *.com
 *.class
 *.exe
 *.o
 *.so
 *.DS_Store
 *.DS_Store?
 *._*
 *.Spotlight-V100
 *.Trashes
 *ehthumbs.db
 *Thumbs.db
 *desktop.ini

 *.apk
 *.ap_
 *.dex
 *.class
 *bin/
 *gen/
 *out/
 *.gradle/
 *build/
 *local.properties
 *proguard/
 *.log
 *.navigation/
 *captures/
 *.iml
 *.idea/workspace.xml
 *.idea/libraries
 */.idea/tasks.xml

*target/
*pom.xml.tag
*pom.xml.releaseBackup
*pom.xml.versionsBackup
*pom.xml.next
*release.properties
*dependency-reduced-pom.xml
*buildNumber.properties
*.mvn/timing.properties

I would go first with almost empty file and add new files there when needed.

Eg first start with:

.classpath 
.project   
.settings  
*.class    
**/target  
*.orig     
*.iml      
.idea      

My .gitignore :

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM