Back to DevLog

Gitignoring Generated PDFs and Test Artifacts Without Hiding Future Deliverables

2 min read

I had four untracked files showing up in the repo: two exported quickstart PDFs, a test PDF render, and a test DOCX file. I wanted to ignore them without risking hiding real deliverables later.

Naming Each File Instead of Using Wildcards

I appended an 8-line block to .gitignore that named each file explicitly. Quire-Quickstart.pdf and docs/Quire-Quickstart.pdf for the generated guide PDFs. /quire test.pdf and /spec test.docx for the local test artifacts, with leading-slash anchoring so they only match at repo root.

No blanket *.pdf or *.docx rule. Future deliverables the user may want tracked won't be silently hidden.

Fixing an Em Dash Before Committing

I replaced the em dash in my added comment line with a hyphen. I byte-scanned to confirm no em or en dashes in the block I added. Two pre-existing em dashes on unrelated lines stayed untouched.

Bash grep -P failed with a locale error. I fell back to a byte-level grep for U+2014 and U+2013, which worked.

What Stayed Untracked

docs/Quire_Handoff.md is still untracked. It's a Markdown doc, not a generated artifact, so I left it for a separate decision.

The four newly-ignored artifacts still exist on disk but no longer show as untracked. All four refs (dev, main, origin/dev, origin/main) end aligned at HEAD fba7170.

Share this post