Gitignore Generator
Choose the languages, frameworks, editors and operating systems your project uses and get one clean .gitignore file. Templates are merged in order, duplicate rules are removed, and you can add your own rules before you copy or download.
Advertisement
How to use the Gitignore Generator
Pick your stack : click templates such as Node, Python, Go or Unity, or use the search box. Quick stacks select common combinations in one click.Add your environment : include the operating systems (macOS, Windows, Linux) and editors (VS Code, JetBrains, Vim) that you and your team use.Add custom rules in the box below the templates, one pattern per line, for project-specific files like uploads/ or *.local.json.Review the preview : duplicates are removed automatically and section headers show where each rule came from.Copy or download the file and save it as .gitignore in the root of your repository, then commit it.
.gitignore pattern syntax cheat sheet
Each line in a .gitignore is a pattern. Git checks them from top to bottom and the last matching pattern wins , which is why negations (!) must come after the rule they override. Patterns are relative to the folder that contains the .gitignore file.
Pattern What it matches
*.logAny file ending in .log, in every folder
build/Any directory named build (a trailing slash matches directories only)
/buildOnly build in the same folder as the .gitignore (a leading slash anchors the pattern)
docs/*.pdfPDF files directly inside docs/, not in its subfolders (a slash in the middle also anchors the pattern)
**/temptemp files or folders at any depth
logs/**Everything inside logs/
a/**/ba/b, a/x/b, a/x/y/b and so on
*.py[cod].pyc, .pyo and .pyd files (character class)
!.env.exampleRe-includes a file that an earlier rule ignored
\#notesA file literally named #notes (escape a leading # or !)
# commentA comment line, ignored by Git
Useful Git commands for ignore rules
git check-ignore -v path/to/file shows which .gitignore file and line ignores a path. It is the fastest way to debug a rule.
git rm -r --cached . followed by git add . re-applies a new .gitignore to files that were already committed. Review the diff before committing.
git status --ignored lists ignored files so you can confirm nothing important is hidden.
git config --global core.excludesFile ~/.gitignore_global sets a personal ignore file for editor and OS clutter across all your repositories.
.git/info/exclude works like a .gitignore that is never committed, handy for files only you have in one clone.
What to commit and what to ignore
Ignore anything that is generated, downloaded, machine-specific or secret : dependency folders (node_modules/, vendor/, .venv/), build output (dist/, target/, bin/), caches, logs, local databases and .env files with real credentials. Commit what other developers need to reproduce the project: source code, configuration templates such as .env.example, shared editor settings you agree on, and lock files (package-lock.json, poetry.lock, go.sum, Cargo.lock for applications). If a secret was ever committed, ignoring it later is not enough: rotate the key, because it stays in the Git history.
Frequently asked questions
What is a .gitignore file? A .gitignore is a plain text file in your Git repository that lists patterns for files and folders Git should not track, such as dependencies (node_modules), build output, logs, local environment files and editor or operating system clutter.
Where do I put the .gitignore file? Save it as .gitignore (with the leading dot and no extension) in the root folder of your repository. You can also add more .gitignore files in subfolders; their patterns apply relative to that folder.
Why is a file still tracked after I added it to .gitignore? A .gitignore only affects untracked files. If Git already tracks a file, remove it from the index with git rm --cached <file> (or git rm -r --cached <folder>), then commit. The file stays on disk but Git stops tracking it.
Should editor and OS files go in the project .gitignore? Many teams include common ones (.DS_Store, Thumbs.db, .vscode/, .idea/) so nobody commits them by accident. Alternatively each developer can put them in a global ignore file configured with git config --global core.excludesFile ~/.gitignore_global.
What does a ! at the start of a pattern mean? A leading ! negates a pattern, re-including a file that an earlier pattern ignored, for example .vscode/* followed by !.vscode/settings.json. Git cannot re-include a file if its parent directory is ignored.
Should I ignore lock files like package-lock.json? No for applications: commit package-lock.json, yarn.lock, poetry.lock, Cargo.lock and similar lock files so everyone installs the same dependency versions. These templates do not ignore lock files, except where noted as optional.
Is my selection sent to a server? No. All templates are built into the page and the file is generated in your browser. Your selection is only remembered in this browser's local storage.
Related tools
License Generator Create a LICENSE file for MIT, Apache, GPL, BSD, ISC, MPL or Unlicense with your name and year. Robots.txt Generator Build a robots.txt file with rules, sitemap lines and AI-bot blocking presets. Htaccess & Nginx Redirect Generator Build 301 redirects for .htaccess, Nginx and Netlify or Cloudflare _redirects. Cron Expression Generator Build crontab schedules visually, read them in plain English and see the next run times. JSON Formatter Beautify, minify and validate JSON, with a collapsible tree view. QR Code Generator Make QR codes for links, Wi-Fi, email and more. Barcode Generator Create Code 128, EAN-13, UPC-A, EAN-8, Code 39 and ITF-14 barcodes as PNG or SVG. JSON to Excel Converter Turn JSON into a styled .xlsx spreadsheet; nested arrays become their own linked sheets. Password Generator Create strong passwords and passphrases. UUID Generator Generate UUID v4 and v7 / GUIDs in bulk and copy or download them. Hash Generator Generate MD5, SHA-1, SHA-256 and SHA-512 hashes of text or files. MD5 Hash Generator Generate MD5 hashes of text, lines or files and verify checksums. SHA-256 Hash Generator SHA-256 and HMAC-SHA256 hashes of text, lines or files, in hex or Base64. SQL Formatter & Beautifier Format, beautify or minify SQL queries for MySQL, PostgreSQL and more. JavaScript Beautifier Format and beautify messy or minified JavaScript, or minify it. HTML Formatter Beautify and indent HTML code with a live preview. CSS Formatter Beautify CSS with indent controls and optional property sorting. Base64 Encoder Decoder Encode or decode Base64 text and files, and make data URIs. URL Encoder Decoder Percent-encode or decode URLs, query strings and form data. HTML Entity Encoder / Decoder Escape and unescape HTML entities, named or numeric. XML Formatter Beautify, validate and minify XML with a collapsible tree view. JSON to CSV Convert JSON data to CSV for spreadsheets. CSV to JSON Convert CSV data to JSON with live preview. Excel to CSV Convert XLSX spreadsheets to CSV. Unzip Files Open and extract ZIP files online. RAR & 7z Extractor Open RAR, 7z and other archives online and extract files. ZIP File Creator Compress files and folders into a ZIP. Regex Tester Test and debug regular expressions live. CSV Viewer Open a CSV or TSV file as a sortable, filterable table. Excel Viewer (XLSX / XLS) Open XLSX, XLS and ODS spreadsheets in your browser without Excel. YAML Validator & Formatter Validate, format and minify YAML, and convert YAML to JSON or back. Bcrypt Hash Generator & Checker Create bcrypt password hashes and check a password against a hash. UTM Campaign URL Builder Add UTM tracking parameters to links and make a QR code. Schema Markup Generator (JSON-LD) Create JSON-LD structured data for FAQ, Product, Article and more. Line Ending Converter Convert text and files between CRLF, LF and CR line endings. Meta Tag Generator Create SEO, Open Graph and X meta tags with live previews. Sitemap Generator Turn a list of URLs into a valid XML sitemap file. Open Graph Preview Paste OG tags and preview how links look on Facebook, X and LinkedIn. Markdown to HTML Convert Markdown to clean HTML with a live editor. XML to JSON Convert XML to JSON with validation. Binary Translator Convert text to binary, hex, octal and back. Email Validator Check email lists and spot disposable addresses. Website Down Checker Check if a website is down for everyone. Fake Data Generator Generate mock data as JSON, CSV or SQL. File Info Viewer Check file size, type, date and MD5/SHA hashes. Text Encoding Converter Detect and convert text file encodings like UTF-8, UTF-16 and Latin-1. Deep Link Generator Create links that open directly in apps. JSON Viewer Explore JSON as a collapsible tree, search keys and values and copy any node's path. HTML Minifier Minify HTML: strip comments and whitespace safely and see how many bytes you save. HMAC Generator Generate and verify HMAC signatures with SHA-256, SHA-512, SHA-1 or MD5. URL Parser Break a URL into its parts and edit query string parameters with a live rebuild. SQLite Viewer Open .db and .sqlite files in your browser, browse tables and run SQL queries. CSS Minifier Minify CSS with csso or a built-in engine and see the size saved instantly. CRC32 Checksum Calculator Calculate CRC-32, CRC-32C, CRC-16 and Adler-32 checksums of text or large files. User Agent Parser See your user agent and parse any UA string into browser, OS, engine and device. YouTube Embed Code Generator Create responsive YouTube embed code with start time, autoplay, loop and privacy mode. DOCX Viewer Open and read Word .docx files in your browser, then print or save them as HTML. JavaScript Minifier Minify JavaScript with Terser: compress, mangle and see how many bytes you save. JWT Decoder Decode JSON Web Tokens, read the claims and expiry, and verify HS256 signatures. EPUB Reader Open and read EPUB e-books in your browser with pages, a table of contents and font controls. JSON Minifier Minify and validate JSON, sort keys and see exactly how many bytes you save. JWT Generator Create and sign HS256, HS384 or HS512 JSON Web Tokens in your browser and verify them. What Is My Browser See your browser, version, OS, engine, screen and which web features it supports. Font Viewer Preview TTF, OTF, WOFF and WOFF2 fonts with sample text, waterfall, glyphs and metadata. Markdown Editor Write Markdown with a toolbar, live split preview, autosave and .md or HTML export. Random String Generator Generate secure random strings and tokens in bulk with any length and character set. HTTP Status Codes Search every HTTP status code with plain-English meanings, causes, fixes and RFC references. TTF to WOFF2 Converter Convert TTF and OTF fonts to WOFF2 or WOFF and get a ready @font-face CSS snippet. Code Diff Checker Compare two code files side by side or unified, with syntax colors and changes highlighted. API Key Generator Create secure API keys and secrets with prefixes, checksums and SHA-256 hashes for storage. MIME Type Lookup Find the MIME type for any file extension, or the extensions for a MIME type, in 400+ entries. Password Strength Checker See how strong a password really is, how long it takes to crack and how to improve it. Subnet Calculator Calculate IPv4 network, broadcast, host range, masks and host count, and split subnets. SERP Snippet Preview Preview your title tag and meta description with pixel-accurate truncation on desktop and mobile. Regex Cheat Sheet 75+ ready-to-use regex patterns for emails, URLs, IPs and dates, each with a live test box. Caesar Cipher Encode and decode Caesar shift ciphers and crack unknown shifts with a ranked brute force. IPv6 Expander & Compressor Expand IPv6 addresses to full form or compress them per RFC 5952, one or many at once. GraphQL Formatter Pretty-print and indent GraphQL queries, mutations and schemas, or minify them, instantly. Vigenère Cipher Encrypt and decrypt Vigenère and Autokey ciphers, and crack unknown keys with frequency analysis. Chmod Calculator Convert Linux file permissions between checkboxes, octal (755) and symbolic (rwxr-xr-x) notation. JSON to TypeScript Generate TypeScript interfaces or types from JSON, with nested types and optional fields. Morse Code Translator Translate text to Morse code and back, then play it as sound or a blinking light, or save a WAV. HTML Table Generator Build HTML tables in an editable grid with styles, header rows, CSV import and live preview. Atbash Cipher Encode and decode Atbash ciphers (A↔Z, B↔Y) in Latin or Hebrew, with a live letter mapping table. CSS Box Shadow Generator Design layered CSS box shadows with a live preview, presets and one-click Copy CSS. Bulk URL Opener Open a list of URLs in new tabs at once or in batches, with cleanup, dedupe and delay. Hex to Text Converter Convert hex to text and text to hex with UTF-8 support and space, 0x, \x or comma formats. CSS Border Radius Generator Round each corner, draw elliptical 8-value radii or random blob shapes and copy the CSS. Hreflang Tag Generator Create hreflang tags, sitemap entries and Link headers for every language and region, validated. ASCII Table Full ASCII code chart 0–255 in decimal, hex, octal, binary and HTML, with search and copy. CSS Button Generator Design CSS buttons with gradients, borders, shadows and hover and active states, then copy the code. Canonical Tag Generator Normalize URLs and create rel=canonical tags and HTTP headers, for one page or a whole list. Unicode Character Lookup Find Unicode characters by name or code point and copy them with UTF-8, HTML and code escapes. CSS Flexbox Generator Build flexbox layouts visually: set container and item properties, then copy the CSS and HTML. Twitter Card Generator Create X / Twitter Card meta tags with Open Graph fallbacks, character counters and a live preview. Punycode Converter Convert international domain names, emails and URLs between Unicode and xn-- Punycode, in bulk. CSS Grid Generator Draw CSS grid layouts: set tracks and gaps, drag to name areas, then copy the CSS and HTML. PX to REM Converter Convert px to rem or em and back, with a 1-100px table and a whole-CSS converter. JSON to XML Converter Convert JSON to well-formed XML with attributes, arrays and pretty print. JSON to YAML Converter Convert JSON to clean YAML as you type, with indent, quoting and sort options. YAML to JSON Converter Convert YAML to pretty or minified JSON, with errors pinned to the exact line. HTML to Markdown Converter Turn HTML or pasted rich text into clean Markdown with tables and live preview. Markdown Table Generator Build Markdown tables in a grid or paste from Excel/CSV, with alignment and preview. JSON Validator Check JSON with the exact line and column of each error, fix tips and one-click auto-fix. JSON Escape / Unescape Escape text for a JSON string, unescape \n and \" back to text, or stringify a whole object. URL Slug Generator Turn titles into clean, SEO-friendly URL slugs: accents, stop words, separators and bulk lines. JavaScript Keycode Finder Press any key to see its JavaScript key, code, keyCode, which, location and modifiers. Glassmorphism CSS Generator Design frosted-glass UI cards with blur, transparency and border sliders, then copy the CSS. CSS Text Shadow Generator Layer CSS text shadows with a live preview and neon, 3D, outline and retro presets. Image to Base64 Convert images to Base64 data URIs, CSS backgrounds and HTML img tags in your browser. Base64 to Image Paste a Base64 string or data URI to preview, identify and download the image. DNS Lookup Look up A, AAAA, MX, TXT, NS, CNAME, SOA and CAA records with TTLs over secure DNS. HTML Editor (Live Preview) Write HTML, CSS and JavaScript and see a live, sandboxed preview as you type. QR Code Scanner Scan QR codes with your camera or from an image and safely read the link or text. JSON Compare Compare two JSON documents and see every added, removed and changed path. Hex to Decimal Convert hex to decimal instantly with steps and signed mode. Decimal to Hex Convert decimal to hex instantly with steps and signed mode. Binary to Decimal Convert binary to decimal instantly with steps and signed mode. Decimal to Binary Convert decimal to binary instantly with steps and signed mode. Binary to Hex Convert binary to hex instantly with steps and signed mode. Hex to Binary Convert hex to binary instantly with steps and signed mode. Binary Calculator Add, subtract, multiply, divide, AND, OR, XOR and shift binary numbers with decimal values. Hex Calculator Hexadecimal + − × ÷ and AND, OR, XOR, NOT, shifts with decimal and binary equivalents. Two's Complement Calculator Decimal to two's complement binary and back for 4-64 bits, with invert-and-add-1 steps. RAID Calculator Usable capacity, efficiency and fault tolerance for RAID 0, 1, 5, 6, 10, 50 and 60 arrays. XML to CSV Converter Convert XML to CSV: detects repeating records, flattens nested data, pick your columns. CSV to XML Converter Convert CSV to well-formed XML with custom root and row names, escaping and pretty print. TOML to JSON Converter Convert TOML to JSON and JSON to TOML with a full v1.0 parser and clear error lines. JSON to Go Struct Turn JSON into Go structs with inferred types, nested structs and json tags. JSON to Python Class Generate Python dataclasses, Pydantic models or TypedDicts with type hints from JSON. JSON to C# Class Convert JSON to C# classes or records with System.Text.Json or Newtonsoft attributes. JSON Schema Generator Turn sample JSON into a draft 2020-12 JSON Schema with types, required fields and formats. JSONPath Tester Test JSONPath expressions live: filters, slices, wildcards and recursive search, with matches highlighted. JSON Sorter Sort JSON keys A-Z recursively, sort arrays by value or by a key, then pretty-print or minify. JSON to HTML Table Convert a JSON array of objects into clean HTML table code with CSS styles and a live preview. CSV to SQL Converter Convert CSV to SQL CREATE TABLE and INSERT statements for MySQL, PostgreSQL, SQLite or SQL Server. HTML to JSX Converter Convert HTML to valid React JSX: className, htmlFor, style objects, self-closing tags and events. CSS Clip-Path Generator Draw CSS clip-path shapes by dragging points: polygons, circle, ellipse and inset. Copy the CSS. CSS Animation Generator Create CSS keyframe animations from 23 presets with live preview, timing controls and Copy CSS. CSS Triangle Generator Make CSS triangles in 8 directions with the border trick or clip-path. Set size and color, copy CSS. CSS Loader Generator Pick from 14 pure CSS spinners and loaders, set color, size and speed, then copy the HTML and CSS. Cubic Bezier Generator Drag the control points to design a CSS easing curve, compare it with linear and copy cubic-bezier(). CSS Filter Generator Adjust blur, brightness, contrast, hue, sepia and drop-shadow on an image and copy the CSS filter. CSS Specificity Calculator Calculate CSS selector specificity (a, b, c), including :is(), :not(), :has() and :where(), and compare. ULID Generator Generate sortable ULIDs and UUID v7 in bulk, monotonic option, and decode their timestamps. IPv4 to IPv6 Converter Convert IPv4 to IPv4-mapped, 6to4 and NAT64 IPv6, extract IPv4 from IPv6, and get int/hex/binary. cURL to Code Converter Convert curl commands to JavaScript fetch, Axios, Python requests, Node.js, PHP and Go code. Base32 Encoder / Decoder Encode and decode Base32 (RFC 4648), Base32hex, Crockford and z-base-32 from text, hex or files. Base58 Encoder / Decoder Encode and decode Base58 and Base58Check (Bitcoin alphabet) from text or hex, with checksum verification. Unicode Escape / Unescape Convert text to \uXXXX, \u{...}, \x, &#...; or CSS escapes and decode them back. File Hash Checker Get MD5, SHA-1, SHA-256 and SHA-512 checksums of files and verify them against a hash. TOTP Generator Generate 2FA one-time codes from a secret key, create otpauth QR codes and verify codes. RSA Key Generator Generate 2048, 3072 or 4096-bit RSA key pairs as PEM, PKCS#1, JWK or OpenSSH, locally. SSL Certificate Decoder Decode PEM SSL/X.509 certificates: subject, issuer, expiry, SANs, key and fingerprints. Text Encryption Tool Encrypt and decrypt text with a password using AES-256-GCM, entirely in your browser. Htpasswd Generator Create .htpasswd entries with bcrypt, APR1-MD5 or SHA-1 for Apache and Nginx basic auth. Code to Image Turn code into a beautiful syntax-highlighted PNG with themes, window frame and background. Mermaid Diagram Editor Write Mermaid code and see flowcharts, sequence, Gantt and ER diagrams live. Export SVG or PNG. API Request Tester Send GET, POST, PUT and DELETE requests with headers and a body, then inspect the response. WebSocket Tester Connect to a ws:// or wss:// server, send messages and watch a timestamped live log. WHOIS Lookup Look up who registered a domain or IP: registrar, creation and expiry dates, name servers, status. Mailto Link Generator Build encoded mailto: links with cc, bcc, subject and body, plus HTML code and a QR code. WhatsApp Link Generator Create wa.me click-to-chat links with a pre-filled message, button HTML and a QR code. Google Maps Embed Generator Turn an address or coordinates into responsive Google Maps iframe embed code, no API key. Neumorphism CSS Generator Design soft UI neumorphic shapes with live preview and copy the box-shadow CSS. SVG Wave Generator Make layered SVG waves for section dividers and export SVG, PNG or a CSS background. SVG Blob Generator Generate random organic SVG blob shapes with gradients and export SVG, PNG or CSS clip-path. Placeholder Image Generator Create placeholder images in any size, color and text as PNG, JPG, WebP, SVG or data URI. Excel to JSON Converter Convert Excel sheets (XLSX, XLS, ODS) to JSON with header row, type and shape options. CSV to Excel Converter Convert CSV files to a real .xlsx workbook with typed numbers and dates, one sheet per file. CSV Splitter Split a large CSV into smaller files by row count, file count or column value, header kept. CSV Merger Combine many CSV files into one, matching columns by name, with dedupe and a source column. VCF to CSV Converter Convert vCard (.vcf) contacts to CSV for Google or Outlook, or turn a CSV back into a VCF. Calendar Event (.ics) Generator Create an .ics calendar invite with time zone, reminders and repeats + Google/Outlook links. Octal to Decimal Convert octal to decimal instantly with steps and signed mode. Decimal to Octal Convert decimal to octal instantly with steps and signed mode. Binary to Octal Convert binary to octal instantly with steps and signed mode. Octal to Binary Convert octal to binary instantly with steps and signed mode. Hex to Octal Convert hex to octal instantly with steps and signed mode.
See All Developer Tools ▾