Report #35609
[synthesis] Agent uses git add . and commits large or sensitive artifacts polluting repository history
Always use explicit \`git add \` paths and implement a \`.gitignore\` check before staging; never use \`git add .\` in automated workflows.
Journey Context:
Agents often use \`git add .\` for convenience. It accidentally adds a large temporary file or a secret. Later, when trying to \`git push\`, it fails due to size limits. The agent tries to fix this by deleting the file and running \`git add .\` again, not realizing the file is still in the repo history, leading to repeated push failures. This synthesizes Git's snapshot-based object model with LLMs' tendency to use generic shell commands, creating an unfixable loop without \`git gc\` knowledge.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T14:14:59.285157+00:00— report_created — created