Skip to content

Instantly share code, notes, and snippets.

@jamesbradlee
Last active June 30, 2025 19:23
Show Gist options
  • Select an option

  • Save jamesbradlee/c71ea69593a8fcb9232cdbaf4a63d22a to your computer and use it in GitHub Desktop.

Select an option

Save jamesbradlee/c71ea69593a8fcb9232cdbaf4a63d22a to your computer and use it in GitHub Desktop.
Kotlin .gitignore
# Ignore everything in the root directory
*
# Unignore all directories recursively
!/**/
# Re-ignore directories that we don't want to see
/.gradle
/.idea
/.vscode
/.kotlin
/build
# Allow gitignore files
!/**/.gitignore
# Allow LICENSE and Markdown files.
!/**/LICENSE
!/**/*.md
# Allow version catalog and gradle.properties
!/gradle/libs.versions.toml
!/gradle.properties
# Allow Kotlin files
!/**/src/*/kotlin/**/*.kt
!/settings.gradle.kts
!/**/build.gradle.kts
# Allow resources
!/**/src/*/resources/**/*
# Re-ignore junk files
.DS_Store
.DS_Store?
Thumbs.db
*.com
*.class
*.dll
*.exe
*.o
*.so
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.tar.gz
*.tgz
*.zip
*.log
*.sql
*.sqlite
*.sqlite3
._*
*.swp*
*.swo*
*.bak*
*.tmp*
*.temp*
*.orig*
*.old*
.Trashes
ehthumbs.db
.Spotlight-V100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment