Untrack generated files that were already gitignored - #259
Merged
Conversation
.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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #253.
The problem
.gitignoreonly stops untracked files from being added. A file committedbefore its rule existed stays tracked and keeps reappearing as modified. Three
files were in that state:
.coverageis the binary SQLite database written bypytest --cov. It had beentracked since v1.0.0 and is rewritten on every local test run, so anyone running
the suite got a spurious modification in
git statusand could commit it byaccident with
git commit -a. The two.ipynb_checkpointsfiles are Jupytereditor 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 --cachedonly — the files stay on disk..gitignorealready covers bothpaths (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-standardnow returns nothing.pytest tests/ install/tests/ --cov=apileavesgit statusclean..coverageis regenerated on disk and correctly ignored.Full suite still green: 1269 passed,
black --check .clean across 253 files,flake8 api/ tests/ scripts/clean.