.gitignore for Snap

6 ignore rules for Snap, ready to copy into your repository.

Universal package manager

The complete .gitignore for Snap

# Generated by LFGitignore - https://lfgitignore.com
# Created: 2026-08-05 01:34:05 UTC
# Technologies: Snap

### Snap ###
prime/
stage/
*.snap
/snap/.snapcraft/
/*_source.tar.bz2
# Buildout parts
parts/

What these Snap rules actually ignore

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

General

Pattern What it ignores
prime/ General
stage/ General
*.snap General
/snap/.snapcraft/ Snapcraft global state tracking data(automatically generated) https://forum.snapcraft.io/t/location-to-save-global-state/768
parts/ Buildout parts

Source archive packed by `snapcraft cleanbuild` before pushing to the LXD container

Pattern What it ignores
/*_source.tar.bz2 Source archive packed by `snapcraft cleanbuild` before pushing to the LXD container

How to use this .gitignore for Snap

  1. Copy the Snap 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 Package Manager .gitignore templates

See every Package Manager template