Encrypted git sync for Logseq. One keystroke to commit & push.
Search "GitSeq" in the Logseq plugin marketplace (Plugins > Marketplace) and click Install.
Manual install (from source)
git clone https://github.com/pihalf/gitseq.git
cd logseq-plugin-git-sync
npm install && npx vite buildIn Logseq: Settings > Advanced > Developer mode (on) → Plugins > Load unpacked → select the dist/ folder.
Before using gitseq, your Logseq graph needs to be a git repo with a remote:
cd ~/Documents/my-graph
git init && git branch -M main
git add -A && git commit -m "Initial commit"
gh repo create my-graph --private --source=. --pushSee the full setup guide below for .gitignore templates and encryption.
Press Cmd+S (macOS) / Ctrl+S (Windows/Linux) to run a full sync:
- Flush pending Logseq edits to disk
git add -A+git commitgit pull --rebase— so edits from your other machines land before you pushgit push
The same pipeline runs on startup, on close, and on the periodic timer, so every machine converges every time you sync. If you're offline, your notes are still committed locally and pushed on the next sync.
Before every pull, gitseq records your state in refs/gitseq/backup — any
sync can be undone with git reset --hard refs/gitseq/backup.
If the same page changed on two machines, gitseq resolves it automatically — no terminal required:
- Plaintext pages/journals: a union merge keeps both sides' lines. Both machines appended to today's journal? Both bullets survive. The worst case is a duplicated bullet you tidy up in the app.
- Files that can't be text-merged (git-crypt encrypted files, images):
your local version keeps the page, and the remote version is saved next to
it as
Page (sync conflict 2026-07-02 15.30.12). Search "sync conflict" in Logseq to review and reconcile — the conflict pages sync to your other machines too. - Edit vs. delete: the edit wins. gitseq never resolves a conflict by throwing words away.
Encrypted graphs are handled safely: gitseq never asks git to merge ciphertext (that would corrupt it), and conflict copies of encrypted files are stored encrypted on the remote.
If resolution ever fails, the repository is restored to its pre-sync state — gitseq never leaves you stranded mid-merge.
| Dot color | Meaning |
|---|---|
| Green | Clean — in sync with remote |
| Yellow | Uncommitted local changes |
| Gray | Offline — committed locally, not yet pushed |
| Red | Error — check dev console (Cmd+Option+I) |
| Blue (spinning) | Sync in progress |
Cmd+Shift+P and search for:
- gitseq: Sync Now — full sync (same as Cmd+S)
- gitseq: Pull — commit + pull, without pushing
- gitseq: Push (no pull) — add, commit, push (escape hatch)
- gitseq: Show Status — refresh the toolbar indicator
Plugins > gitseq > Settings:
| Setting | Default | Description |
|---|---|---|
| Sync Mode | manual |
manual (Cmd+S only) or periodic (auto-sync on timer) |
| Periodic Interval | 15 | Minutes between auto-syncs |
| Commit Message | sync: {{date}} |
{{date}} is replaced with ISO timestamp |
| Sync on Startup | true | Full sync when Logseq opens |
| Sync on Close | true | Full sync before Logseq closes |
| Auto-Resolve Conflicts | union+copies |
union+copies (auto-merge text, copies for the rest), copies-only (never auto-merge), or off (resolve in a terminal yourself) |
- Open Logseq → create a new graph
- Initialize git and push:
cd ~/Documents/my-graph
git init && git branch -M main- Create
.gitignore:
.DS_Store
Thumbs.db
.logseq/
.obsidian/
logseq/bak/
logseq/.recycle/
.Trash/- Commit and create a private remote:
git add -A && git commit -m "Initial commit"
gh repo create my-graph --private --source=. --push- Install gitseq from the marketplace. Done.
Encrypt journals, pages, and assets on GitHub while keeping them plaintext locally:
brew install git-crypt # macOS
git-crypt initCreate .gitattributes:
journals/** filter=git-crypt diff=git-crypt
pages/** filter=git-crypt diff=git-crypt
assets/** filter=git-crypt diff=git-cryptExport and back up your key:
git-crypt export-key ~/.git-crypt-my-graph.keyStore the key in a password manager. Without it, your encrypted files are unrecoverable.
git clone git@github.com:youruser/my-graph.git ~/Documents/my-graph
# If encrypted:
git-crypt unlock ~/.git-crypt-my-graph.keyOpen the graph in Logseq. Install gitseq. Done.
"You do not have the initial commit yet" — Logseq's internal git is pointing elsewhere. Make sure your graph folder has .git with at least one commit.
Authentication failures — Logseq's sandbox may not inherit your SSH agent. Verify with ssh-add -l or configure git config --global credential.helper osxkeychain.
Cmd+S doesn't work — another plugin may have claimed it. Use Cmd+Shift+P → "gitseq: Sync Now".
A sync did something you didn't want — every sync records the previous
state first. Undo with: git reset --hard refs/gitseq/backup (then sync again
once you're happy).
"Repository is in the middle of a merge or rebase" — a manual git
operation (or an interrupted one) was left unfinished. In a terminal, run
git merge --abort or git rebase --abort inside the graph, then sync again.
MIT
