Google Drive Merge Sync

by kebl3541
5
4
3
2
1
Score: 35/100

Description

Sync your vault with Google Drive using your own credentials. Text conflicts resolve by word level three way merge instead of conflicted copies, and deletes go to trash, never into the void. - This plugin has not been manually reviewed by Obsidian staff.

Reviews

No reviews yet.

Stats

stars
129
downloads
0
forks
16
days
NaN
days
NaN
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
0
commits

Latest Version

Invalid date

Changelog

README file from

Github

Google Drive Merge Sync

Downloads GitHub stars Latest release

Sync your vault with Google Drive, using your own Google credentials. When the same note changed on two devices, most sync tools give you a conflicted copy or silently pick a winner. This one merges the two versions word by word, and only where both sides changed the same words does it keep yours and say so.

How it works

  • Every sync starts with a plan. The plugin compares three states of each file: your local copy, the Drive copy, and the last version both sides agreed on. From those it decides, per file, whether to upload, download, merge, rename, or do nothing. On the very first sync there is no shared history yet, so the whole vault uploads; every sync after that transfers only what changed. You can see the plan without running it: the dry run command lists exactly what a sync would do before it does anything.
  • Conflicts are merged, not duplicated. When the same note changed on two devices, the two versions are combined by a word level three way merge against the last synced version. Only where both sides changed the very same words does it keep your side and tell you. The merge engine is shared with the AI Co-Editor plugin and covered by its test suite.
  • Deletes go to the trash, on both sides. A file removed on one device is moved to Obsidian's trash locally (following your deletion preference) and to the Drive trash remotely. Both are reversible.
  • It talks to Drive with your own credentials. You create a free Google OAuth client once; tokens stay on your machine and are never sent to any third party. The drive.file permission means the plugin can only see the one folder it creates in your Drive, nothing else.
  • Other devices join with a connection code. Generate the code on the connected device, paste it on the new one (that's how mobile connects, since the sign-in flow needs a desktop).

Setup, once, about five minutes

Click the cloud button in any note's header (or "Open setup wizard" in the plugin settings). The wizard walks you through it: four links into the Google console, one paste, one sign-in. The client_secret JSON file Google offers for download can be pasted as is; the wizard picks out the two values itself.

The same steps by hand, if you prefer:

  1. Go to console.cloud.google.com and create a project (any name).
  2. APIs and Services, Library: enable the Google Drive API.
  3. APIs and Services, OAuth consent screen: External, fill the two required fields, add yourself as a test user.
  4. APIs and Services, Credentials: Create credentials, OAuth client ID, type Desktop app. Copy the client ID and client secret.
  5. In Obsidian, open the plugin settings, paste both values, press Connect Google Drive, and approve in the browser.

Use

  • Click the cloud button in a note's header, the sync icon in the ribbon, or run the command "Sync now".
  • Optionally set an interval in settings for automatic syncing.
  • "Preview what a sync would do" shows the plan without touching anything.
  • On a second device, install the plugin, connect with the same Google account, set the same folder name, and sync.

Mobile

Sign in once on a desktop, then in settings copy the connection code and paste it into the same setting on your phone or tablet. The device syncs from then on without any browser dance. Treat the code like a password.

Renames

Renames sync as renames on both sides: links keep pointing at the note, and Drive keeps the file's history. When two renamed files are indistinguishable, the plugin falls back to the safe delete plus create rather than guess.

Security and privacy

Points Obsidian's automated plugin review flags, and what they mean here:

  • Vault enumeration: a sync plugin has one job, comparing every local file with its remote counterpart, so it necessarily lists the vault's files each sync. Folders you exclude in settings are skipped. File contents are read only to upload, download, or merge them.
  • Clipboard: written to exactly once, when you click "Copy connection code" to move your connection to another device. The plugin never reads the clipboard.
  • Where your data goes: only to Google Drive, over your own OAuth client with the narrow drive.file scope, meaning the plugin can only ever see the folder it created and nothing else in your Drive. Tokens stay on your machine; no third-party server is involved, ever.

Support

If this plugin adds value for you and you would like to help support continued development, please use the buttons below:

  

License

MIT