2025-10-04 Sat
- rulesync/log/25/10/04 Sat - Issues with gitignore - issues with git/.gitignore -
rulesync/log/25/10/04 Sat - Issues with gitignore 2025-10-04 Sat - git/.gitignore issues
- Yesterday I discovered that the rulesync/gitignore command implies a usage of rulesync in which the configuration files for any given tool are treated as compiled build artifacts. I was curious about trying out this workflow, so I ran it, which added a bunch of rules to
.gitignorefor each AI/Coding/Tool - CursorAI, Claude/Code, etc. - Today, on another computer I discovered the classic problem with introducing git/.gitignore rules after some subset of files have been tracked to the repo. I asked Claude Code about it.
AI/Response
- The
.gitignorepatterns (lines 24-25 and 29-31) will only prevent untracked files from being added, but they don't affect files that are already in the git repository. - Here's what happened:
- To fix this, you have two options:
- The
- So, what do I want to do?
Option 1 - Remove AI configuration files in repo
Pros
- Some Search tools (like PyCharm) can respect git/.gitignore, and it would be convenient to not pollute the search space with a bunch of duplicate information.
- It will be clearer to AI coding tools that respect gitignore which are the "canonical" versions of the files, which will be particularly useful in the common use case of asking AI tools to updating AI rules files.
Cons
- Sometimes when I talk to people about how I accomplish certain things with AI, it's helpful to be able to hyperlink them to the exact prompt I use, and for many, it would be less confusing if that rule were in the format that they know.
- I have to regenerate them regularly, which implies running them in a post-checkout hook.
Option 2 - Keep AI configuration files in repo
- I ended up filing rulesync/GitHub/Issue/25/10/Feature request rulesync githook
- Yesterday I discovered that the rulesync/gitignore command implies a usage of rulesync in which the configuration files for any given tool are treated as compiled build artifacts. I was curious about trying out this workflow, so I ran it, which added a bunch of rules to
- rulesync/GitHub/Issue/25/10/Feature request rulesync githook