Data Location, Compression & Backup
WordGit stores version history separately from your working documents. Your documents stay ordinary files that open fine without the add-in, while chunk-level deduplication and atomic replacement keep your data reliable.
Folder Layout
| Folder or file (Windows default) | Contents and purpose |
|---|---|
%LOCALAPPDATA%\WordGit\app | The UI add-ins, the Rust core engine wordgit.exe and the setup / maintenance program |
%LOCALAPPDATA%\WordGit\service.json | The port the core engine is currently listening on and its access token; the add-ins use it to connect (deleted on exit) |
%LOCALAPPDATA%\WordGit\settings.json | Settings shared by Word and WPS: interface language, commit author, uncommitted-work reminder, AI summary (API key stored encrypted) and beta update notifications |
<data folder>\repositories | The Git history repositories of all documents and projects. By default the data folder is the same as the runtime folder |
%LOCALAPPDATA%\WordGit\sessions | Temporary files for previews, comparisons and merge reviews; leftovers older than one day are cleaned up automatically |
%LOCALAPPDATA%\WordGit\logs | The error log wordgit.log (rotated automatically above 1 MB; the user home folder is automatically redacted to %USERPROFILE%) |
%LOCALAPPDATA%\WordGit\diagnostics | Redacted .zip packages created by Export Diagnostics; safe to delete at any time |
Linux and macOS paths
- Linux:
~/.local/share/WordGit - macOS:
~/Library/Containers/com.kingsoft.wpsoffice.mac/Data/WordGit
Changing the History Data Folder
In Word or WPS, click WordGit → Settings → Storage to see the current location or move it to another drive (for example a roomier D:\WordGitData). WordGit copies and verifies the whole history before switching to the new location; Word and WPS automatically share the new setting. Review drafts currently open in sessions and settings.json stay in the original runtime folder.
How Paths Are Associated
- Standalone documents: the history repository is associated with the document's full path on disk. After a standalone document is renamed or moved to a new path, it maps to a new history repository (the original history repository is kept intact and is never deleted).
- Inside a multi-document project: documents are tracked by a stable identifier within the project, so moving or renaming them inside the project automatically reconnects them to their existing history (see Project Panel & Multi-Document Projects).
Chunk-Level Deduplication and Automatic History Compaction
- Deduplicated chunk storage: each commit splits content into chunks and reuses chunks already stored, writing only new or changed data and manifests instead of copying the entire
.docxevery time. - Automatic background maintenance when idle: after roughly every 10 new commits, once the keyboard and mouse have been idle for about 20 seconds, the core engine consolidates small pack files in the background on a single low-priority thread. Roughly every 30 days it runs a full maintenance pass and reclaims unused chunks that have not been referenced by any version for more than two weeks.
- Low-memory streaming: commit, preview, export, compare and merge all use file streams and chunked buffers, so the history repository is never held entirely in memory.
- Power-loss protection: every commit is flushed to disk via
core.fsync=committedbefore success is reported, so a sudden power cut cannot corrupt committed history. - Backward-compatible formats: all three history formats are fully supported — whole-file (
document.docx), the legacy split format (wordgit.meta) and the current raw-byte chunk format (wordgit.snapshot) — so upgrading the add-in never requires rewriting old commits.
Automatic Crash Recovery
For operations that replace the working document in place, such as Switch Branch, Restore, Finish Merge or Pull:
- The core engine first writes a recovery intent log (journal) and backs up the working document into a temporary backup in
sessions; - Once the replacement succeeds and passes verification, the temporary backup is deleted immediately;
- If Word / WPS exits unexpectedly or the system restarts in the middle of the replacement, the core engine reads the intent log on the next start: if the branch had not yet been switched, the pre-operation document is restored; if it had, the new content is kept. Either way a clear explanation is shown. If it cannot decide automatically, the backup file is kept for 30 days and its path is shown to you.
Recommended Backup Strategy
Although WordGit has several layers of atomic protection, regular offline or off-site backups are still strongly recommended:
- Save your documents and fully close Word / WPS;
- Back up both your document folders and the entire
<data folder>\repositoriesfolder; - If there are review drafts for which you have not yet clicked Finish Merge, back up the
sessionsfolder as well; - You can also push documents or whole projects to a private GitHub / Gitee remote repository as an off-site copy.
About the API key in settings.json
On Windows the API key is encrypted with DPAPI and bound to the current Windows user, so a settings.json copied to another computer or user cannot decrypt it. Just enter the key again under Settings → AI Summary; the other settings keep working.
