.gitignore for Nx
6 ignore rules for Nx, ready to copy into your repository.
Build system and monorepo tooling
The complete .gitignore for Nx
# Generated by LFGitignore - https://lfgitignore.com
# Created: 2026-09-17 17:01:12 UTC
# Technologies: Nx
### Nx ###
dist
tmp
out-tsc
# Nx local computation cache
.nx/cache
# Nx project graph and workspace data
.nx/workspace-data
.nx/migrate-runs
What these Nx rules actually ignore
Every pattern below, and why it belongs in your .gitignore.
Compiled output
| Pattern | What it ignores |
|---|---|
dist |
Compiled output |
tmp |
Compiled output |
out-tsc |
Compiled output |
Nx workspace data
| Pattern | What it ignores |
|---|---|
.nx/cache |
Nx local computation cache |
.nx/workspace-data |
Nx project graph and workspace data |
.nx/migrate-runs |
Nx workspace data |
How to use this .gitignore for Nx
- Copy the Nx 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.