Paste a .gitignore and paths to see which files git ignores and which line decides
Runs in your browser. Nothing you type is sent anywhere. Checked against sources on 16 Oct 2026.When git ignores a file it should keep, or keeps one it should ignore, the answer is always one line of the .gitignore. Paste your rules and the paths you care about, one per line, and each path is marked ignored or kept with the line that decided it. A file inside an ignored folder is named too, because git never looks inside that folder, so no ! rule can bring the file back.
Paste your .gitignore into the Your own rules box.
Type the paths to check under Test paths, one per line; end a folder with a slash.
Read each answer: ignored or kept, the line number and the rule, or the parent folder that hides it.
Every new repository needs a .gitignore before the first commit, or build output, dependencies and editor settings end up in history. GitHub publishes one template per language, framework, editor and operating system; this page has 61 of them, at a fixed commit, and merges the ones you tap into a single file.
Testing paths. Type paths under Test paths, one per line, with a slash at the end of a folder. Each is marked ignored or kept, with the line number and the rule that decided it. The matching follows git's own rules:
Already tracked files. A .gitignore only affects untracked files. If a file was committed before, remove it from the index with git rm --cached and commit; the file stays on your disk.
The rest of the article, and all 6 questions about .gitignore Generator, are on the .gitignore Generator page.
A .gitignore only affects files git is not tracking yet. Once a file has been committed, git keeps following it. Run git rm --cached followed by the path, commit, and from then on the rule applies. The file stays on your disk; only its copy in the index goes.
Ignore the folder's contents rather than the folder: write logs/* and then !logs/keep.txt. If you write logs/ instead, git skips the whole folder without looking inside, so the ! line can never bring the file back. The Test paths box shows which case you are in.
A slash at the end limits the pattern to folders, so build/ ignores a folder named build but not a file. A slash at the start or in the middle ties the pattern to the folder of the .gitignore, so /dist ignores the top dist only. Without a slash, the pattern matches at any depth.
Yes, as git is on Linux and in most CI systems, so Build/ does not match a folder named build. On Windows and macOS, git usually sets core.ignorecase to true and ignores case, so a pattern may match locally but not on the build server. Write patterns in the exact case of the files.
Rates and rules change; check the source before you rely on a figure.
Still stuck? Ask about .gitignore Generator and anybody who knows can answer. No account needed.
On the related tools: Cron Expression Generator – Generate a cron expression by choosing when the job should run · Sitemap Index Generator – Split a large site into numbered sitemaps with an index file · Google Analytics URL Builder – The five utm parameters GA4 reads, with the naming traps flagged.