Filesystem sync and missing files

Dotvault keeps your sidebar in sync with your project directory. Files you create, rename, or delete outside the app — whether from your terminal, your editor, or a git checkout — are picked up automatically the next time you focus the Dotvault window or switch between projects.

What happens when a file disappears

If an env file is removed from disk, Dotvault does not delete it from your sidebar. The row is greyed out with a warning icon and a “This file no longer exists on disk” tooltip. Your snapshot history and stored encryption key are preserved.

Click the greyed-out row and Dotvault will show you a dedicated panel with two options:

Restore latest snapshot — Rewrites the file from your most recent snapshot. If the file was encrypted, Dotvault re-encrypts it with the same stored key, so you can carry on working without re-entering anything.

Forget file — The explicit opt-in to purge the row, its snapshot history, and its stored encryption key. Dotvault shows a confirmation dialog before destroying anything.

Branch switches

Because history is never destroyed automatically, a git checkout that temporarily removes a tracked env file works cleanly. When you switch back to the branch with the file, the row un-greys and the stored key picks up where it left off — no prompts, no re-import.

Unsaved edits

If you delete a file while you have unsaved edits open in the editor, Dotvault shows a banner at the top of the editor: Save writes your in-memory changes back to disk (recreating the file), or Discard drops your changes and switches to the missing-file panel.

Case-sensitivity

Filename matching is case-sensitive. On case-insensitive filesystems (macOS APFS default), renaming .env.Prod to .env.prod outside Dotvault will leave a missing row for the old casing and show a new row for the new casing. Neither loses history; you can use Forget to clean up the stale one.