chore: stop tracking runtime state (SQLite DB, RSpec examples.txt) #19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/gitignore-runtime-state"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Two files sat permanently dirty or untracked in every working copy:
data/baktainer.db— the container writes its SQLite database to/data./backupsanddev-datahad ignore rules;/datadid not, so the live DB showedup as untracked on every checkout.
app/spec/examples.txt— RSpec's generated example-status file, rewritten onevery test run. It was already listed in
.gitignore(line 9), but the rulenever took effect: the file had been committed earlier, and gitignore does not
apply to files git is already tracking. So every
bundle exec rspecleft theworking tree dirty.
Fix
Two different problems, two different fixes:
data/baktainer.db/dataapp/spec/examples.txtgit rm --cachedAdding another ignore rule for
examples.txtwould have done nothing — the file hadto be removed from the index.
Verification
app/spec/examples.txtis still on disk (--cachedremoves from the indexonly), so RSpec keeps its example-status history
git statusnow reports a clean tree, and stays clean across a test run