.gitignore
A plain text file that specifies intentionally untracked files that Git should ignore and never commit to the repository.
What it is
The .gitignore file contains a list of patterns outlining which files or directories Git must completely ignore. This prevents massive, auto-generated, or highly sensitive files from cluttering the repository or accidentally leaking into the public commit history.
When you would use it
You set up a .gitignore file at the very start of a project to ensure private data, personal IDE settings, and compiled binaries stay strictly on your local machine.
Common operations
- Ignoring compiled output folders like /build or node_modules.
- Preventing API keys or .env files from being pushed to a public server.
Related terms
Where this is taught
No learning path uses this term yet. Browse the Learning Atlas for guided sequences through related ideas.