Repository navigation
fix(gitignore): ignore backups/ again - #138
Merged
Merged
Conversation
…nored Commit 2c8359f appended backups/ to the /Dockerfile.bench.v2 line, which had no trailing newline. The result, /Dockerfile.bench.v2backups/, matched neither file, so dumps written by scripts/backup.sh showed up as untracked and could be committed by accident.
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.
Bug
Commit 2c8359f (backup script) appended
backups/to the last line of.gitignore, which had no trailing newline. Line 60 became/Dockerfile.bench.v2backups/, which matches neitherDockerfile.bench.v2nor thebackups/directory thatscripts/backup.shwrites to by default. Database dumps therefore show up as untracked files and can be committed by mistake.Fix
Split the line back into
/Dockerfile.bench.v2andbackups/, with a comment naming the script that writes it.Verification
git check-ignore -v backups/artex-db-x.sql.gz Dockerfile.bench.v2now reports.gitignore:63:backups/and.gitignore:60:/Dockerfile.bench.v2(before: neither path was ignored).git ls-files | grep backups/is empty, so no tracked file becomes ignored.Not verified: nothing else; this is a
.gitignore-only change.