Skip to content

Docs Sync Script

Document Type: Reference Last Updated: 2026-03-21 Vault destination: 05_Reference

The repo docs/ folder is canonical. Edit docs here, then push to Obsidian for viewing. Never edit directly in the Obsidian vault — those changes will be overwritten on the next push.

Use sync_docs.bat to sync documentation between the repo and the Obsidian vault.

Paths

  • Source of truth (repo): C:\Users\zeler\auto-warz\auto-warz\docs
  • Obsidian vault (read-only mirror): C:\Users\zeler\OneDrive\Obsidian\Knowledge\Projects\AutoWarz

Run From Repo Root

.\sync_docs.bat --dry-run

Preview what would be pushed from docs/ to the vault. No files are copied or deleted.

.\sync_docs.bat

Shows a full preview of pending changes, then asks Proceed with sync? [Y/N]. If Y, copies new/updated files from docs/ to the vault without deleting extra vault files.

.\sync_docs.bat --mirror

Mirrors docs/ to the vault, including deleting vault files not present in docs/. Use with care.

.\sync_docs.bat --dry-run --mirror

Preview of mirror mode (safe).

Pull from Vault into Repo (--pull)

Only use --pull when you need to bring in changes that were made directly in the vault. This is a recovery/exception flow — normal edits belong in the repo.

.\sync_docs.bat --pull --dry-run

--pull --dry-run previews what would change in docs/.

.\sync_docs.bat --pull

Copies changed files from the vault back into docs/ (no mirror deletes).

.\sync_docs.bat --pull --mirror

Mirrors the vault into docs/ including deletes. Use only to fully reset the vault state.

Notes

  • .obsidian and .git folders are excluded.
  • Non-dry-run modes always preview first and require Y/N confirmation.
  • Robocopy exit codes below 8 are treated as success by the script.
  • Run a naming check anytime before syncing:
pwsh scripts/check-doc-naming.ps1