.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

  1. Copy the Electron 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 Desktop .gitignore templates

See every Desktop template