Skip to content

Untrack generated files that were already gitignored - #259

Merged
rbardaji merged 1 commit into
mainfrom
fix/253-untrack-generated-files
Aug 26, 2026
Merged

Untrack generated files that were already gitignored#259
rbardaji merged 1 commit into
mainfrom
fix/253-untrack-generated-files

Conversation

@rbardaji

Copy link
Copy Markdown
Collaborator

Closes #253.

The problem

.gitignore only stops untracked files from being added. A file committed
before its rule existed stays tracked and keeps reappearing as modified. Three
files were in that state:

.coverage
docs/.ipynb_checkpoints/s3_api_tutorial-checkpoint.ipynb
docs/.ipynb_checkpoints/s3_to_dataset_workflow_tutorial-checkpoint.ipynb

.coverage is the binary SQLite database written by pytest --cov. It had been
tracked since v1.0.0 and is rewritten on every local test run, so anyone running
the suite got a spurious modification in git status and could commit it by
accident with git commit -a. The two .ipynb_checkpoints files are Jupyter
editor autosaves duplicating the tutorials beside them.

None of the three are used by the API, the tests, the installer or CI.

The change

git rm --cached only — the files stay on disk. .gitignore already covers both
paths (lines 7 and 8), so nothing there needed changing and they cannot come
back.

For anyone with the repository cloned

Local copies are kept. The files simply stop being tracked after pulling; no
manual cleanup is needed and nothing is deleted from working copies.

Testing

Acceptance criteria from the issue, verified locally:

  • git ls-files -i -c --exclude-standard now returns nothing.
  • Running pytest tests/ install/tests/ --cov=api leaves git status clean.
    .coverage is regenerated on disk and correctly ignored.
  • All three files remain present in the working copy.

Full suite still green: 1269 passed, black --check . clean across 253 files,
flake8 api/ tests/ scripts/ clean.

.gitignore only stops untracked files from being added, so a file
committed before its rule existed stays tracked and keeps reappearing as
modified. Three were in that state.

.coverage is the binary SQLite database written by `pytest --cov`. It had
been tracked since v1.0.0 and is rewritten on every local test run, so
anyone running the suite got a spurious modification in `git status` and
could commit it by accident with `git commit -a`. The two
docs/.ipynb_checkpoints/ files are Jupyter editor autosaves duplicating
the tutorials beside them.

None of the three are used by the API, the tests, the installer or CI.
They are removed from the index only; existing clones keep their local
copies and simply stop tracking them.

Closes #253
@rbardaji
rbardaji merged commit 13dafa7 into main Aug 26, 2026
2 checks passed
@rbardaji
rbardaji deleted the fix/253-untrack-generated-files branch August 26, 2026 20:09
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.

Remove generated files that are tracked despite being gitignored

1 participant