.gitignore for Electron
3 ignore rules for Electron, ready to copy into your repository.
Desktop applications with JavaScript, HTML and CSS
The complete .gitignore for Electron
# Generated by LFGitignore - https://lfgitignore.com
# Created: 2026-09-17 18:11:14 UTC
# Technologies: Electron
### Electron ###
# Webpack build output
.webpack/
.vite/
out/
What these Electron rules actually ignore
Every pattern below, and why it belongs in your .gitignore.
Webpack
| Pattern | What it ignores |
|---|---|
.webpack/ |
Webpack build output |
Vite
| Pattern | What it ignores |
|---|---|
.vite/ |
Vite |
Electron Forge
| Pattern | What it ignores |
|---|---|
out/ |
Electron Forge |
How to use this .gitignore for Electron
- Copy the Electron rules above, or download the file directly.
- Create a file named .gitignore at the root of your Git repository and paste the rules into it.
- If some of those files are already tracked, run git rm -r --cached . then commit again — Git only applies ignore rules to untracked files.
- Commit the .gitignore so everyone on the team shares the same rules.