.gitignore
Tick each stack in your repo. Your merged .gitignore shows here.
Some browsers, such as Chrome, save the download as gitignore, without the dot. Rename it to .gitignore.
Turned off for your stacks
from : .
Most templates come from github/gitignore under the CC0 1.0 licence. We wrote the PHP, Nuxt, Vue, React, Vite, Angular, SvelteKit, Astro, Django, Flutter, Dart and Docker templates. The file is built in your browser.
How it works
- Tick each stack in your repo: the languages and frameworks, the tools, and the operating systems and editors your team uses. Type in the search box to find one fast.
- The page joins the templates in your browser, with a header such as # --- Laravel --- before each section. Nothing goes to our server.
- A line that an earlier section already has is removed, so each rule shows once. If a ! line comes in between, the repeat stays, because the order of those lines changes the result.
- Some templates clash. Python ignores every lib/ folder, but Flutter and Rails keep their code in lib/. When you tick both, the page turns that line off and tells you why.
- The stacks you tick go into the page URL, so you can share the link. Copy or download the file and save it as .gitignore in the root of your repo.
FAQ
Frequently asked questions
Where does the .gitignore file go?
In the root folder of your repo, next to the .git folder. Git also reads a .gitignore in any subfolder, and its rules apply only inside that folder. Commit the file so everyone on the team ignores the same files.
Why does a file still show in Git after I add it to .gitignore?
.gitignore works only for files that Git does not track yet. If the file was committed before, take it out of the index and keep it on disk with git rm --cached path/to/file (add -r for a folder), then commit. To see which rule ignores a file, run git check-ignore -v path/to/file.
Should OS and editor files go in a global gitignore?
You can put files such as .DS_Store, Thumbs.db and .idea/ in a global file, because they come from your computer and not from the project. Run git config --global core.excludesFile ~/.gitignore_global and save the rules there. If you do not set it, Git reads ~/.config/git/ignore. Many teams still add them to the repo file so new members are covered.
How do I use one .gitignore in a monorepo?
Tick every stack in the repo and save the file in the root. A rule with no slash at the start, such as node_modules/, matches in every folder, so it covers apps/web and apps/mobile. A rule that starts with a slash, such as /vendor/, matches only at the root. Change it to the folder path, for example /api/vendor/, or add a .gitignore inside that folder.
Where do the templates come from?
Most come from github/gitignore, the collection GitHub offers when you create a repo. It is under the CC0 1.0 licence, so you can use the output anywhere. We wrote the templates it does not have, such as PHP, React, Vite and Docker. We also wrote our own Flutter, Dart and Vue templates, because the upstream ones ignore files a merged file must keep: every *.lock file for Flutter, every *.js file for Dart and the test/ folder for Vue.
DevWorkspace Pro
One workspace for every project
Files, Git, GitHub, AI agents, the terminal and your runtimes in one desktop app. Works with every project folder.