Select your languages, frameworks, and tools to generate a production-ready .gitignore file. Runs entirely in your browser with no data sent anywhere.
Quick Start Presets
Select Technologies
No technologies selected yet. Search above or pick a preset to get started.
.gitignore
0 linesYour .gitignore will appear here
Select technologies from the panel on the left to generate your .gitignore file.
A .gitignore file instructs Git to leave certain files out of version control entirely. Without one, directories like node_modules, Python venv, and compiled build folders end up committed to your repository, inflating its size and polluting diffs for every contributor. Files like .env containing API keys or database passwords are particularly dangerous to commit by accident because they are hard to purge from history once they are in. A gitignore generator saves you from memorizing platform-specific patterns by producing a ready-to-use file based on the tools you actually use.
The simplest approach is to generate one before your first commit so nothing unwanted ever enters the history. Save the file as .gitignore in your project root, then run git status to verify that the paths you expected to ignore are no longer listed as untracked. If they still show up, check that the filename has no extension and that the patterns match the actual paths. Revisit the file when you add new dependencies or tools because the right ignore rules grow with the project over time.
An asterisk matches any sequence of characters within a single path segment, so *.log ignores every file ending in .log in any directory. A double asterisk matches across directory boundaries, so **/cache/ ignores cache folders at any depth in the tree. A trailing slash marks a pattern as directory-only, meaning build/ only ignores directories named build and not files with that name. A leading exclamation mark negates a previous rule, letting you re-include a specific file after a broader pattern excluded it. Lines starting with a hash are comments and are completely ignored by Git.
Node projects almost universally ignore node_modules along with any local environment overrides. Python projects need to exclude __pycache__, compiled .pyc files, and virtual environment directories like venv or .venv. Java builds using Maven or Gradle produce a target or build directory full of compiled class files that should never be committed. Docker-based projects typically ignore .env files holding container credentials and secrets. Using a gitignore generator that understands these stacks means you get all the right rules on the first try. Working on a Docker project? Also check out our Docker run to Compose converter. If you need to set file permissions on your server, use our chmod calculator.