Skip to content
devops6 active rulesVerified 2026-09-30

Snap (Linux) .gitignore Template

Standard Snap (Linux) gitignore template from upstream github/gitignore collection. Generated and merged deterministically with upstream GitHub repository patterns to keep your repository clean of package directories, temporary build artifacts, and local environment files.

Interactive Stack Generator

Open in Full Generator
Search for templates
Quick add:
Selected1
Snap (Linux)
Selected Templates (1)
.gitignore
### Snap (Linux) ###
# gitginore template for creating Snap packages
# website: https://snapcraft.io/
parts/
prime/
stage/
*.snap
# Snapcraft global state tracking data(automatically generated)
# https://forum.snapcraft.io/t/location-to-save-global-state/768
/snap/.snapcraft/
# Source archive packed by `snapcraft cleanbuild` before pushing to the LXD container
/*_source.tar.bz2
6 rules1 template16 lines
Deterministic

Raw Snap (Linux) .gitignore

Crawlable upstream source template
linux-snap.gitignore15 lines
# gitginore template for creating Snap packages
# website: https://snapcraft.io/
parts/
prime/
stage/
*.snap
# Snapcraft global state tracking data(automatically generated)
# https://forum.snapcraft.io/t/location-to-save-global-state/768
/snap/.snapcraft/
# Source archive packed by `snapcraft cleanbuild` before pushing to the LXD container
/*_source.tar.bz2

Key Pattern Breakdown

Core Ignored Rules

Primary upstream ignore rules defined for this technology.

parts/prime/stage/*.snap/snap/.snapcraft//*_source.tar.bz2

Source & Verification

License:: CC0-1.0

Place this file in the root directory of your project as .gitignore. Changes take effect on newly added or untracked files.