No description
Find a file
ml2310 4a2e75d759 Bump to v0.2.2; fix new-subfolder files not syncing to other devices
When a new folder and files inside it are created on device A and synced
to Drive, device B's smart sync silently skipped all files in that folder.
Root cause: the unknownChanges loop in smartSync() skipped FOLDER_MIME
entries before files were processed, so when a file's parent folder was
also new (not yet in the local index), folderIdToPath.get(parentId)
returned undefined and the file was dropped with a console.warn.

Fix: split the loop into two passes — Pass 1 resolves new folders and
registers them in folderIdToPath, Pass 2 resolves files using the now-
complete folder map. This ensures files in newly-created subfolders
(e.g. 2026/Attachments/Nala Project/nala.pdf) are downloaded correctly
on all other devices without requiring a manual Rebuild Index.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 19:58:59 +08:00
src Bump to v0.2.2; fix new-subfolder files not syncing to other devices 2026-05-08 19:58:59 +08:00
.gitignore Initial release of NeoGDSync v0.1.0 2026-04-13 01:44:39 +08:00
esbuild.config.mjs Initial release of NeoGDSync v0.1.0 2026-04-13 01:44:39 +08:00
eslint.config.mjs Fix: revert ID→id overcorrection; eslint-plugin confirms ID is correct (acronym) 2026-04-15 11:55:45 +08:00
LICENSE Add MIT LICENSE 2026-04-14 00:09:51 +08:00
main.js Bump to v0.2.1; fix cross-folder rename data loss + surface delete errors 2026-05-01 18:09:51 +08:00
manifest.json Bump to v0.2.2; fix new-subfolder files not syncing to other devices 2026-05-08 19:58:59 +08:00
package-lock.json Fix: revert ID→id overcorrection; eslint-plugin confirms ID is correct (acronym) 2026-04-15 11:55:45 +08:00
package.json Bump to v0.2.1; fix cross-folder rename data loss + surface delete errors 2026-05-01 18:09:51 +08:00
README.md Add README 2026-04-13 02:00:24 +08:00
styles.css Fix review bot: replace element.style.* with CSS class 2026-05-01 17:59:31 +08:00
tsconfig.json Initial release of NeoGDSync v0.1.0 2026-04-13 01:44:39 +08:00
versions.json Bump to v0.2.2; fix new-subfolder files not syncing to other devices 2026-05-08 19:58:59 +08:00

NeoGDSync

Lightweight Google Drive sync plugin for Obsidian.

Features

  • Smart Sync — auto conflict detection, only syncs changed files
  • Force Push — local vault → Google Drive
  • Force Pull — Google Drive → local vault
  • Conflict handling — saves Drive copy as a conflict file, never overwrites silently
  • Path-based index — fast, no full crawl needed after first sync
  • Version history — optionally keep file revisions on Drive
  • Configurable excludes — glob patterns to skip files/folders
  • URI handlerobsidian://neogdsync?mode=smart|push|pull for automation

Setup

  1. Install the plugin
  2. Go to Settings → NeoGDSync
  3. Enter your Google OAuth2 Refresh Token
  4. Enter your Google Drive Vault Root Folder ID (the Drive folder that maps to your vault root)
  5. Click the ☁ ribbon icon or run a command to sync

Getting a Refresh Token

This plugin uses a standard OAuth2 refresh token with read/write access to Google Drive.

You can obtain one via:

The token is stored locally in your vault's plugin data and never leaves your device except to authenticate with Google.

Commands

Command Description
Smart Sync Detect and sync only changed files, with conflict detection
Force Push Upload all local changes to Drive
Force Pull Download all Drive changes to local
Rebuild Drive Index Re-crawl Drive vault folder to rebuild index
Show Conflicts View detected conflicts

URI Handler

Trigger sync from outside Obsidian (Shortcuts, scripts, etc.):

obsidian://neogdsync?mode=smart
obsidian://neogdsync?mode=push
obsidian://neogdsync?mode=pull

License

MIT