【问题标题】:Git: what to write into .gitignore file for this kind of repository?Git:为这种存储库写入 .gitignore 文件的内容是什么?
【发布时间】:2016-12-06 23:01:28
【问题描述】:

如果 repo 是一个包含一组不同项目的文件夹,应该在 .gitignore 中放入什么?它们是 Android Studio 的、Maven 的并在许多操作系统上开发。

经过研究我想把这几行写出来,如果有错误或者你有更好的想法,请告诉我:

 **/*~
 *.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

【问题讨论】:

  • 您可以将.gitignore文件放在每个项目文件夹中。
  • 有一个网站就是为了这个目的。 gitignore.io

标签: android git maven gitignore repository-design


【解决方案1】:

我会先使用几乎空的文件,并在需要时添加新文件。

例如首先开始:

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

【讨论】:

    【解决方案2】:

    我的 .gitignore :

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-03-14
      • 1970-01-01
      • 2011-05-21
      • 2021-01-26
      • 1970-01-01
      • 1970-01-01
      • 2021-08-12
      • 2016-05-29
      相关资源
      最近更新 更多