Gitignore Generator

Select your languages, frameworks, IDEs, and tools to generate a comprehensive .gitignore file instantly.

Select Templates

Languages & Runtimes
Frameworks
IDEs & Editors
Operating Systems
Tools & DevOps
Build Tools
General

.gitignore Output

Select templates from the left to generate your .gitignore

About the .gitignore Generator

A .gitignore file tells Git which files and directories to skip when staging commits. This free gitignore generator lets you combine templates for any language, framework, IDE, or OS into one ready-to-use file — no manual copy-pasting required.

  • 35+ templates covering popular languages: Node.js, Python, Go, Java, Rust, PHP, and more
  • Framework templates for React, Next.js, Vue, SvelteKit, Django, Rails, Laravel, and others
  • IDE and editor templates for VS Code, JetBrains, Vim, Xcode, Eclipse, and Emacs
  • OS templates for macOS, Windows, and Linux system junk files
  • DevOps templates for Docker, Terraform, Ansible, and Vagrant
  • Combine multiple templates — output is merged into a single clean file

How to Generate a .gitignore File

  1. 1

    Search or browse templates

    Use the search box to filter by name (e.g. "python") or browse templates grouped by category: Languages, Frameworks, IDEs, Operating Systems, and more.

  2. 2

    Select your templates

    Click each template badge to toggle it on or off. Use Select all within a category to add every template in that group at once. Selected templates are highlighted in orange.

  3. 3

    Review the generated output

    The right panel updates live as you select templates. All chosen templates are merged in order, with clear section comments separating each one.

  4. 4

    Download or copy the file

    Click Download to save as .gitignore (note the leading dot), or Copy to paste it directly into your editor.

  5. 5

    Place it at the repository root and commit

    Move the file to the root of your Git repository (same level as your .git folder), then run git add .gitignore && git commit -m "Add .gitignore".

Tip: After placing the file, you can add your own custom patterns at the bottom. Use *.bak to match all backup files, or /secrets/ to ignore a specific directory.

Common Use Cases

New JavaScript / Node.js Project

  • • Select Node.js + your framework (React, Next.js, Vue)
  • • Add VS Code or JetBrains for your IDE
  • • Add macOS or Windows to ignore OS junk files

Python Data Science or Web Project

  • • Select Python to ignore __pycache__, .venv, and *.pyc
  • • Add Django or other framework if applicable
  • • Include Environment Files to protect .env secrets

Java / Spring Boot Application

  • • Select Java + Spring Boot + Maven or Gradle
  • • Add JetBrains (IntelliJ) or Eclipse IDE template
  • • Keeps target/ and build artifacts out of source control

DevOps / Infrastructure Repos

  • • Select Terraform to ignore .tfstate and .terraform/
  • • Add Docker and Ansible templates as needed
  • • Include Environment Files to avoid committing secrets

Mobile Development (iOS / Android)

  • • Select Swift + Xcode for iOS projects
  • • Select Kotlin + Gradle for Android projects
  • • Add Dart / Flutter for cross-platform apps

General Clean-up

  • • Add macOS, Windows, and Linux to ignore all OS noise
  • • Add Logs & Temp Files and Archives & Binaries
  • • Safe baseline for any repository regardless of stack

Frequently Asked Questions

What is a .gitignore file?

A .gitignore file is a plain-text configuration file that tells Git which files and directories to exclude from version control. It prevents build artifacts, secrets, dependencies, and editor junk from cluttering your repository history.

Where does the .gitignore file go?

Place it in the root directory of your Git repository — the same folder that contains the hidden .git directory. You can also place a .gitignore in subdirectories to apply rules only within that folder.

Can I add custom rules to the generated file?

Yes. After downloading or copying, open the file in any text editor and add your own patterns. For example, add *.bak to ignore backup files, or /secrets/ to ignore a specific directory.

What if I already committed files that should be ignored?

Adding a pattern to .gitignore won't untrack files already in the repository. Run git rm --cached <file> to stop tracking the file while keeping it on disk, then commit the removal.

Should I commit the .gitignore file itself?

Yes — always commit .gitignore. This ensures every team member and every CI/CD pipeline uses the same ignore rules, preventing "works on my machine" issues caused by accidentally committed build artifacts or secrets.

What is a global .gitignore?

A global gitignore applies to every repository on your machine, not just one project. It's ideal for IDE files and OS-specific noise like .DS_Store or Thumbs.db. Set it up with: git config --global core.excludesfile ~/.gitignore_global.

How do I ignore a file but keep a specific subfolder?

Use the ! negation prefix. For example, to ignore all of build/ except build/keep-this/, add both build/ and !build/keep-this/ to your file.

Is my data safe? Does this tool send anything to a server?

No data leaves your browser. All template selection and file generation happens entirely client-side using JavaScript. Your project configuration and generated output are never uploaded or stored anywhere.