.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-05-29 12:57:31 UTC
# Technologies: Expo

### Expo ###
# Node.js dependencies
node_modules/
# runtime state (Metro bundler, dev-client data, tunnels)
.expo/
# shared project settings (app.json edits, etc.)
.expo-shared/
# generic Expo temp files
*.expo
# Expo DevTools tunnels
*.tunnel
# Metro cache folder
*.cache
# temp files created during bundling
*.tmp
# build or Metro logs
*.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 local state and caches

Pattern What it ignores
.expo/ runtime state (Metro bundler, dev-client data, tunnels)
.expo-shared/ shared project settings (app.json edits, etc.)

Metro bundler caches/logs

Pattern What it ignores
*.expo generic Expo temp files
*.tunnel Expo DevTools tunnels
*.cache Metro cache folder
*.tmp temp files created during bundling
*.log build or Metro logs

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

  1. Copy the Expo 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 Mobile .gitignore templates

See every Mobile template