Hacker News
points by Aurornis 6 hours ago | 0 comments
> the file is created inside the project, and Claude Code only adds it to your global git ignore, not the repo's .gitignore. So a fresh clone or a second machine commits it like any other file

A fresh clone wouldn’t have the file. This claim doesn't make any sense.

The only way I can see this getting committed is if someone edited their global .gitignore or, more likely, did a whole directory transfer to do a different machine to work on.

[–] shmulc 6 hours ago
Fair, “fresh clone” was wrong. It happens on a new machine or container without the global ignore, in a copied project folder, or once the file has been committed, since ignore rules don’t apply to tracked files.
[–] rendaw 1 hour ago
In that case what relevance does the gitignore file have at all?