Skip to content

fix(gitignore): anchor logs/checkpoints/models rules to repo root (#20)#24

Open
bradsmithmba wants to merge 1 commit into
cloudtrainerwork:masterfrom
bradsmithmba:fix/anchor-gitignore-dirs
Open

fix(gitignore): anchor logs/checkpoints/models rules to repo root (#20)#24
bradsmithmba wants to merge 1 commit into
cloudtrainerwork:masterfrom
bradsmithmba:fix/anchor-gitignore-dirs

Conversation

@bradsmithmba

Copy link
Copy Markdown

Summary

.gitignore had three unanchored project-specific directory rules:

logs/
checkpoints/
models/

An unanchored directory pattern matches a directory of that name at every level, so these matched src/logs/, src/checkpoints/, and src/models/ as well as the intended root-level artifact directories. Any module added under those source directories is silently ignored by git and never committed — the same class of bug that hid the data layer in #1.

Closes #20.

Reproduction (before)

$ git check-ignore -v src/models/integrated_selector.py
.gitignore:168:models/	src/models/integrated_selector.py

Change

Anchor each rule to the repository root:

/logs/
/checkpoints/
/models/

Verification

src/models/foo.py        -> not ignored   (was ignored)
src/logs/foo.py          -> not ignored   (was ignored)
src/checkpoints/foo.py   -> not ignored   (was ignored)
models/ckpt.pt           -> ignored       (intent preserved)
logs/run.log             -> ignored       (intent preserved)
checkpoints/m.pt         -> ignored       (intent preserved)

Note

The sibling data/ rule has the identical bug and is anchored to /data/ in the PR for #1 (#19). This PR intentionally leaves data/ untouched to avoid overlapping diffs; the two PRs change different lines and merge cleanly.

🤖 Generated with Claude Code

The `logs/`, `checkpoints/`, and `models/` rules were unanchored, so each
matched a directory of that name at every level — including src/logs,
src/checkpoints, and src/models. Any module added under src/models (etc.)
was silently ignored by git and never committed.

Anchor each to the repository root (/logs/, /checkpoints/, /models/) so they
ignore only the intended root-level artifact directories, not source trees.
src/models stays tracked; root model/log/checkpoint artifacts stay ignored.

(The sibling `data/` rule is anchored in the PR for cloudtrainerwork#1.)

Closes cloudtrainerwork#20

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unanchored 'models/' in .gitignore silently ignores src/models additions

1 participant