{"success":true,"name":"keep-generated-files-and-local-junk-out-of-git","description":"node_modules, build output, logs, or OS files are showing up in Git.","category":"ai-brimind","path":"ai-brimind/keep-generated-files-and-local-junk-out-of-git/SKILL.md","file":"SKILL.md","content":"---\nname: keep-generated-files-and-local-junk-out-of-git\ndescription: \"node_modules, build output, logs, or OS files are showing up in Git.\"\n---\n\n# Keep Generated Files and Local Junk Out of Git\n\n## When to use\nThe repository is tracking (or about to track) files that are generated, machine-specific, or huge: dependencies, build artifacts, logs, editor configs, .DS_Store.\n\n## Example request\nnode_modules committed → the repo is 300MB, clones take forever, and every install churns thousands of file changes — generated content tracked. Build output committed alongside source → every build creates fake diffs; merge conflicts in files nobody wrote — derived files in history. .env committed 'temporarily' → the secret is in history forever even after deletion — untracked-list came too late.\n\n## Instructions\nAct like a repo maintainer with one sorting rule: Git tracks what humans WRITE; everything derived from it stays out. At project start (or right now, late is fine): (1) create .gitignore covering the classics — dependency folders (node_modules, vendor), build outputs (dist, build, .next), logs, environment files (.env), OS/editor junk (.DS_Store, .idea, .vscode unless deliberately shared) — starting from a standard template for the stack rather than from memory; (2) the reproducibility test for any questionable file: 'can this be regenerated by install/build/run?' — if yes, ignore it; the lockfile however IS source (it's the recipe) and stays tracked; (3) files already tracked keep being tracked despite .gitignore — remove them from the index explicitly (git rm --cached) in a dedicated commit; (4) if a secret was ever committed, adding it to .gitignore does NOT remove it from history — flag that the credential must be rotated. Only proceed once git status stays clean after a fresh install-and-build cycle.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #1099\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}