hellokunzai368 downloadsSync your vault to a Gitee or GitHub repository.
Sync your Obsidian vault to a private Gitee or GitHub repository. Gitee Sync Plus connects directly to the platform API — no server and no local Git installation required — and works on desktop, iOS, and Android.
data.json), with multiple named tokens per backend.mtime / remote / local)..gitignore file at the vault root.The sync engine computes a Git blob content hash for every file and performs a three-way comparison between the local vault, the remote repository, and the per-device baseline (the last successfully synced state, stored locally in the plugin's localStorage — never in data.json, so it stays device-specific).
The plugin interface automatically follows Obsidian's language and currently supports English and Chinese.
In Obsidian, open Settings → Community plugins → Browse, search for Gitee Sync Plus, install it, and enable it.
For local development builds:
npm install
npm run build
mkdir -p "<vault>/.obsidian/plugins/gitee-sync-plus"
cp main.js manifest.json "<vault>/.obsidian/plugins/gitee-sync-plus/"
Gitee: Create a private repository. In Settings → Security Settings → Personal access tokens, create a token with the projects permission.
GitHub: Create a private repository. A fine-grained personal access token needs Contents: Read and write access to the repository; a classic token needs the repo scope.
Tokens are stored in the Obsidian Secret Storage (Settings → Secrets) when available, and are no longer written to data.json. You can manage multiple named tokens per backend and switch between them from the settings panel.
| Setting | Description |
|---|---|
| Storage backend | Gitee repository or GitHub repository |
| Owner | User or organization from the repository URL |
| Repository | Private repository used for the vault |
| Branch | Gitee defaults to master; GitHub defaults to main. The dropdown auto-populates from the API once owner/repo/token are filled. |
| Token | Managed personal access tokens, stored in the Obsidian keychain. Click Select token to add or choose a saved token (with search and delete); click Test to verify it. |
| Automatic sync interval | Minutes between syncs; 0 disables automatic sync |
| Sync on startup | Runs one sync when Obsidian opens |
| Commit mode | One commit per file (default) or one commit for all changes (batch) |
| Merge strategy | How to resolve same-file conflicts during automatic/startup/scheduled sync: Latest change time (newer wins), All remote, or All local |
| Sync button | When enabled, shows a sync button in the left sidebar ribbon |
| Git panel button | When enabled, shows a Git panel button in the left sidebar ribbon |
| Diagnostic log | Writes the sync plan and result to _gitee-sync-plus-log.md |
| Excluded folders | Raw .gitignore rules at the vault root; edits take effect on the next sync |
Trigger sync from the ribbon icon, the Sync now command, the status bar, the timer, startup sync, or the Git panel. Use Preview sync plan to inspect planned actions without changing either side.
The Git panel is a right-sidebar view that mirrors a typical source-control sidebar, but runs on the plugin's three-way sync model (no local Git binary required). Open it with the Open Git panel command or the optional ribbon button.
owner/repo@branch target.When a file is modified on both sides since the last sync, a conflict is detected.
mtime keeps the newer version, remote always takes the remote copy, local always keeps the local copy.The diff viewer also lets you compare versions, revert individual change blocks, or mark a file as already-synced.
| Command ID | Name | Description |
|---|---|---|
sync-now |
Sync now | Run a full two-way sync |
sync-preview |
Preview sync plan | Compute the plan and write it to the diagnostic note without changes |
open-git-panel |
Open Git panel | Open the right-sidebar Git panel |
Install and configure the plugin on every device with the same repository. Each device keeps its own sync baseline. A new device downloads the remote vault on its first sync and uses incremental sync afterwards.
Mobile operating systems suspend timers in the background, so enabling Sync on startup is recommended.
If a downloaded folder is visible but a file with a non-standard extension is not, open Settings → Files and links and enable Detect all file extensions. The file may already be present but hidden by Obsidian's file explorer.
.obsidian and .git are ignored on both sides.data.json. No need to exclude anything when backing up the vault with other tools. On mobile / older Obsidian versions without secret storage, the token falls back to data.json.This project is based on the original Gitee Sync plugin by ericquan8. The original work is retained under the MIT license (see LICENSE). Thanks to ericquan8 for the foundational implementation that this plugin builds upon.