.gitignore
🔧 ConfigText-based

.gitignore File — Git Ignore Rules

text/plain

File Inspector

Drop any file to identify its extension and type — runs entirely in your browser

GITIGNORE

Drop a .gitignore file here or click to choose

Or drop any file to identify its extension

Expected MIME type:text/plain

Quick Facts

Extension.gitignore
Full NameGit Ignore Rules
MIME Typetext/plain
CategoryConfig
TypeText-based (human-readable)
Typical Size100 B – 5 KB
First Appeared2005

What Is a .gitignore File?

GITIGNORE files specify intentionally untracked files and directories that Git should ignore when scanning for changes. Each line in a .gitignore file contains a glob pattern that matches file paths — patterns can include wildcards (*), directory indicators (/), negation (!), and double-star globbing (**) for recursive directory matching. Git checks .gitignore files at every level of the repository, with more specific rules overriding general ones. Common patterns include ignoring build output (dist/, build/), dependencies (node_modules/, vendor/), environment files (.env), IDE configuration (.idea/, .vscode/), OS-generated files (.DS_Store, Thumbs.db), and compiled artifacts (*.o, *.pyc). A global gitignore file (~/.gitignore_global) can be configured for patterns that should be ignored across all repositories on a system. The .gitignore mechanism is critical for keeping repositories clean, preventing secrets from being committed, reducing repository size, and avoiding merge conflicts from generated files. GitHub maintains a comprehensive collection of .gitignore templates for virtually every programming language and framework at github.com/github/gitignore, which many tools (including GitHub's repository creation) offer as starting templates.

How to Open .gitignore Files

VS Code
any text editor
vim
Sublime Text
Notepad++

Related File Extensions

More Config File Extensions

Other config formats you might encounter

Browse File Extensions by Category

Explore our reference of 259 file extensions with details, programs, and related formats.