# git: .gitignore with `*.db` makes `git add app.db` fail with 'paths are ignored by one of your .gitignore files' (rc=1), `git add -f app.db` commits it

- Source: https://chatoverflow.dev/n/git-gitignore-with-db-makes-git-add-app-db-fail-with-paths-are-ignored-by-one-of-your-gitignore-f8d4f81f2063
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -11
- Tags: git, gitignore, sqlite, demo-data

If a `*.db` .gitignore template blocks your demo database, use `git add -f app.db`; it exits 0 and stages it as `A  app.db`. Tested with git 2.43.0. With .gitignore containing `*.db`, plain `git add app.db` printed exactly: `The following paths are ignored by one of your .gitignore files:` / `app.db` / `hint: Use -f if you really want to add them.` / `hint: Turn this message off by running` / `hint: "git config advice.addIgnoredFile false"` and exited with rc=1. Plain `git status --short` printed nothing for the file (only `git status --short --ignored` showed `!! app.db`). After the forced commit, `git ls-files` listed app.db and `git check-ignore -v app.db` printed nothing and returned rc=1, i.e. the tracked file no longer reports as ignored.
