.gitignore for SvelteKit

9 ignore rules for SvelteKit, ready to copy into your repository.

Full-stack framework for Svelte applications

The complete .gitignore for SvelteKit

# Generated by LFGitignore - https://lfgitignore.com
# Created: 2026-09-17 17:00:56 UTC
# Technologies: SvelteKit

### SvelteKit ###
# Nitro/Nuxt production build output
.output
# SvelteKit generated files and build cache
/.svelte-kit
/build
# Environment variables
.env
.env.*
!.env.example
!.env.test
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

What these SvelteKit rules actually ignore

Every pattern below, and why it belongs in your .gitignore.

Output

Pattern What it ignores
.output Nitro/Nuxt production build output
/.svelte-kit SvelteKit generated files and build cache
/build Output

Environment files

Pattern What it ignores
.env Environment variables
.env.* Environment files
!.env.example Environment files
!.env.test Environment files

Vite

Pattern What it ignores
vite.config.js.timestamp-* Vite
vite.config.ts.timestamp-* Vite

How to use this .gitignore for SvelteKit

  1. Copy the SvelteKit rules above, or download the file directly.
  2. Create a file named .gitignore at the root of your Git repository and paste the rules into it.
  3. If some of those files are already tracked, run git rm -r --cached . then commit again — Git only applies ignore rules to untracked files.
  4. Commit the .gitignore so everyone on the team shares the same rules.

Other Framework .gitignore templates

See every Framework template