Tick the languages, frameworks, editors and systems you use and get one .gitignore with repeats removed. Nothing is uploaded.
A .gitignore generator joins ready-made lists of files that Git should not track into one file for your project, and this one does it from 34 templates you tick: 27 languages and frameworks such as Node.js, Python, Java, Go, Rust, Next.js, Flutter and Terraform, 4 editors and tools (JetBrains IDEs, Visual Studio Code, Vim, Xcode) and 3 operating systems (macOS, Windows, Linux). The templates are copied unchanged from the github/gitignore project, which is released under CC0-1.0. Each template gets a header such as ### Node.js ###, then the templates are written in a fixed order, then your own lines. The page opens with Node.js, Visual Studio Code and macOS ticked. There is no separate React or Django template in that project: use Node.js for a React app and Python for Django.
Tick C and C++ together. The C template has 36 patterns and the C++ template has 39, so 75 lines in all. Many of them are the same, such as *.o, *.exe and *.a. With Remove repeated lines on, the first time a pattern appears it is written and later copies are dropped, so the result has 56 patterns and the page reports 19 repeated lines removed. A comment such as # Object files is dropped as well when every pattern under it was already written earlier. Turn the option off and you get all 75 lines, which Git treats the same way.
In a .gitignore the last pattern that matches a file wins, and a line that starts with ! un-ignores what an earlier line ignored. So removing a repeat is only safe if no ! line sits between the two copies. The page therefore never removes a ! line, and after it writes one it forgets which patterns it has seen, so a later copy of a pattern is kept. This means the Node.js template, which has several ! lines, removes fewer repeats than a template without them. Trailing spaces that Git ignores are not counted, so equal patterns match; a space escaped with a backslash stays part of the pattern. Git also cannot bring back a file when a folder above it is ignored, so a ! line only works if its folder is not ignored.
Lines you type in the box are written exactly as typed, apart from line endings, and blank lines are collapsed. They go last under a ### Custom ### header, with repeats removed the same way. Ignoring a file does not stop Git tracking it if it was already committed: run git rm --cached on the file and commit, and the .gitignore takes over from then on. Editor and system files, such as .DS_Store or .idea, are often better in a global ignore file set with the core.excludesFile setting, so they do not appear in every project; the macOS, Windows, Linux and editor templates are provided for projects that want them in the repository anyway.
The text of every template is taken from the github/gitignore repository at one fixed revision, committed on 2 October 2026, so the same ticks give the same file every time. Templates are updated by that project over time, so a newer version of a template on GitHub may differ from the one here. The page does not fetch anything when you use it. A pattern in a template can use a literal carriage return inside brackets, as the macOS template does for Icon; it is kept as it is. Your lines are not saved; only the ticks and the two display options are kept on this device.
Tick your stack, copy the result and save it as a file named .gitignore, with the leading dot and no extension, in the top folder of your repository. Run git add .gitignore and commit it, so everyone who clones the project gets the same rules.
A .gitignore only affects files Git is not tracking yet. If the file was committed before, run git rm --cached on it, for example git rm --cached .env, and commit. The file stays on your disk and Git stops tracking it from then on.
It un-ignores a pattern, for example !.env.example after .env.*, so .env.example is tracked while other .env files are not. The last matching line wins. A ! line cannot bring back a file inside a folder that is itself ignored.
Tick Node.js, Visual Studio Code and macOS, which are on when the page opens. Node.js ignores node_modules and logs, Visual Studio Code ignores most of the .vscode folder but keeps shared files such as settings.json, and macOS ignores .DS_Store. Add Next.js if you use it; it covers the .next and out folders.
The github/gitignore project, which these templates come from, has no template under those names. A React app built with Node tooling is covered by Node.js, and a Django project is covered by Python. Add your own lines for anything specific, such as a local settings file.
No. The text is processed in your browser and not uploaded. The lines you type are not saved; only which templates are ticked and the two display options are kept on this device.