alexandervasin246 downloadsSync your whole vault to GitHub with one click — on desktop and mobile. Interactive conflict resolution, commit preview, and auto-sync. Pure JavaScript, no system Git required.
One-click Git sync for Obsidian, with interactive conflict resolution, on desktop and mobile. Push and pull your whole vault to a Git remote (GitHub via HTTPS token) with a single button — and pick exactly what goes into each commit.
Git Vault Sync is a pure-JavaScript plugin, so it needs no system git and
works on Android/iOS as well as desktop.
There's a Sync engine setting (Auto / Git / GitHub API); Auto picks
the right one per platform:
Both push and pull to the same GitHub remote, so all your devices stay in sync.
Both engines honor your Excluded paths and the repo's .gitignore with the
same glob semantics, so a path you exclude on the desktop is also excluded when
syncing from mobile.
One deliberate difference: the GitHub API engine always skips the whole config
folder (.obsidian/), regardless of your exclude patterns. The config folder
is hundreds of small, frequently-changing files; pulling them one blob at a time
hits GitHub rate limits and mobile memory, and most desktop plugins there are
useless on a phone anyway. So the API engine syncs your notes, not your
Obsidian settings. The git engine (desktop) can sync .obsidian/ if you don't
exclude it. Either way, the plugin's own data.json (which holds your token) is
always excluded by both engines.
.obsidian/workspace.json) that are
never committed or counted. Patterns and the repo's .gitignore apply on both
engines; note the API engine additionally always skips .obsidian/ (see
Engine asymmetry).Updates then arrive automatically through Obsidian.
BRAT installs plugins straight from a GitHub repo and keeps them updated. Works on desktop and mobile.
main.js, manifest.json, and styles.css from the
latest release (or build them — see Building from
source).<your-vault>/.obsidian/plugins/git-vault-sync/.
On mobile, copy them into the same folder inside the vault (see
TESTING.md for per-platform tips).Open Settings → Git Vault Sync and fill in:
| Setting | Description |
|---|---|
| Remote URL | HTTPS clone URL, e.g. https://github.com/user/vault.git |
| Branch | Branch to sync (default main) |
| Username | Your GitHub username |
| Personal Access Token | Stored in plaintext in this plugin's data.json |
| Author name / email | Written into commits |
| Commit message | Template; {{date}} is replaced with a timestamp |
Run Git Vault Sync: Test connection to remote from the command palette to verify the URL and token.
⚠️ Security: the token is stored in plaintext in
.obsidian/plugins/git-vault-sync/data.json. If your vault itself is a Git repo, make sure that file is.gitignored so the token is never committed.
git init, links the remote, fetches, and checks out the
remote branch.npm install
npm run dev # watch + rebuild
npm run build # type-check + production bundle → main.js
For development, symlink the project into a test vault so rebuilds are picked up:
ln -s "$(pwd)" /path/to/Vault/.obsidian/plugins/git-vault-sync
The whole vault is the working tree (<vault>/.git). All Git operations go
through isomorphic-git over Obsidian's own
filesystem and HTTP, so they work identically on desktop and mobile, with a
GitHub Git Data API engine as the default on mobile. See src/ for the module
layout (the filesystem/HTTP adapters, the two sync engines, and conflict
handling) and CONTRIBUTING.md for the gotchas.
.obsidian/plugins/git-vault-sync/data.json. Obsidian has no secure secret storage
available to plugins, so the token sits on disk unencrypted, like other Git
plugins for Obsidian..obsidian/plugins/git-vault-sync/data.json (or the whole plugin folder) is in your
vault's .gitignore, or your token will be pushed to the remote.MIT — see LICENSE.