Docs Sync Script¶
Document Type: Reference Last Updated: 2026-03-21 Vault destination:
05_ReferenceThe 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¶
Preview what would be pushed from docs/ to the vault. No files are copied or deleted.
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.
Mirrors docs/ to the vault, including deleting vault files not present in docs/. Use with care.
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.
--pull --dry-run previews what would change in docs/.
Copies changed files from the vault back into docs/ (no mirror deletes).
Mirrors the vault into docs/ including deletes. Use only to fully reset the vault state.
Notes¶
.obsidianand.gitfolders are excluded.- Non-dry-run modes always preview first and require
Y/Nconfirmation. - Robocopy exit codes below
8are treated as success by the script. - Run a naming check anytime before syncing: