.gitignore for Expo
14 ignore rules for Expo, ready to copy into your repository.
Framework for React Native apps
The complete .gitignore for Expo
# Generated by LFGitignore - https://lfgitignore.com
# Created: 2026-09-17 18:11:00 UTC
# Technologies: Expo
### Expo ###
# Node.js dependencies
node_modules/
.expo/
.expo-shared/
*.expo
*.tunnel
# Cache file
*.cache
# Temporary files
*.tmp
# Log file
*.log
# Environment variables
.env
# Local environment variables
.env.local
.env.*.local
# npm debug logs
npm-debug.log*
# Yarn debug logs
yarn-debug.log*
# Yarn error logs
yarn-error.log*
What these Expo rules actually ignore
Every pattern below, and why it belongs in your .gitignore.
Node modules
| Pattern | What it ignores |
|---|---|
node_modules/ |
Node.js dependencies |
.expo/ |
Expo local state and caches runtime state (Metro bundler, dev-client data, tunnels) |
.expo-shared/ |
shared project settings (app.json edits, etc.) |
*.expo |
Metro bundler caches/logs generic Expo temp files |
Expo DevTools tunnels
| Pattern | What it ignores |
|---|---|
*.tunnel |
Expo DevTools tunnels |
Metro cache folder
| Pattern | What it ignores |
|---|---|
*.cache |
Cache file |
*.tmp |
Temporary files |
*.log |
Log file |
Environment variables
| Pattern | What it ignores |
|---|---|
.env |
Environment variables |
.env.local |
Local environment variables |
.env.*.local |
Environment variables |
Package manager logs
| Pattern | What it ignores |
|---|---|
npm-debug.log* |
npm debug logs |
yarn-debug.log* |
Yarn debug logs |
yarn-error.log* |
Yarn error logs |
How to use this .gitignore for Expo
- Copy the Expo 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.