Skip to content

Releases

0.3.2

Choose a tag to compare

@github-actions github-actions released this 19 Nov 08:01

What's Changed

  • Make full resync download-only, after confirming what it discards (2c32c29)
  • Retry git-data writes GitHub hasn't replicated yet; README badges by @wandermyz in #4
  • Wait for the workspace in app tests on Obsidian 1.15 by @wandermyz in #6
  • Stop interrupted pulls from producing bogus conflict copies by @wandermyz in #5

Full Changelog: 0.3.1...0.3.2

0.3.1

Choose a tag to compare

@github-actions github-actions released this 18 Oct 09:08

Release housekeeping for the Obsidian community directory. The plugin's behaviour hasn't changed since 0.3.0.

  • Signed build provenance. This release was built by GitHub Actions from the 0.3.1 tag, and main.js, manifest.json and styles.css carry artifact attestations. To check one:
    gh attestation verify main.js --repo wandermyz/obsidian-github-sync
    
  • Dropped the builtin-modules build dependency in favour of Node's built-in module list. The bundle is byte-for-byte the same.
  • The README now discloses clipboard use: the sign-in dialog's Copy code button writes the one-time device code, and nothing reads the clipboard.

0.3.0

Choose a tag to compare

@wandermyz wandermyz released this 18 Oct 08:35

No more registering your own app on github.com. Leave App client ID empty and the plugin signs in through its own GitHub App, Obsidian GitHub Enterprise Sync. The app has read and write access to file contents only, and only on the repositories you install it on. Use Settings → GitHub Enterprise Sync → Repository access → Choose repositories to pick them.

GitHub Enterprise Server works as before: register an app with device flow on your server and enter its client ID. The README has the steps.

Changes

  • App client ID is optional on github.com. Scopes only appears for OAuth apps.
  • If the app isn't installed on your repository, the error now says so and links to the install page. Before, it was a bare 404 or 403.
  • Token refresh always goes to the app that issued the token, so changing the client ID later doesn't break an existing sign-in.

Upgrading

Existing setups keep working unchanged: your configured client ID is still used. To switch to the built-in app, clear App client ID, install the app on your notes repository, and sign in again.

0.2.0

Choose a tag to compare

@wandermyz wandermyz released this 18 Oct 07:22

The plugin is now "GitHub Enterprise Sync", with the id github-enterprise-sync (it was obsidian-github-sync), in preparation for the Obsidian community directory. Obsidian treats a new id as a separate plugin, so existing installs need a one-time move. See below.

Fixes

  • Remote changes could be missed for up to a minute. Obsidian's requestUrl honoured GitHub's max-age=60, so a sync soon after the previous one could see a stale branch head and skip commits pushed from another device. API reads now send Cache-Control: no-cache.
  • A repository can no longer write into the vault's config folder when that folder has been renamed from .obsidian.

Changes

  • Note files are read and written through Obsidian's Vault API, so open editors update in place. Deletions follow your Files and links → Deleted files setting.
  • The settings are searchable from Obsidian's settings search, and invalid host and repository values are flagged inline.
  • Requires Obsidian 1.13.0 or later.

Moving an existing install

On each device:

  1. Run Sync now with the old plugin, so nothing local is left unpushed.
  2. Install 0.2.0. It lands in .obsidian/plugins/github-enterprise-sync/.
  3. Copy data.json and local.json from .obsidian/plugins/obsidian-github-sync/ into the new folder. This carries over your settings, your sign-in and the sync position.
  4. Enable GitHub Enterprise Sync, disable the old plugin, then delete .obsidian/plugins/obsidian-github-sync/.

If you can't copy files on a device (for example on iOS), do step 1, then sign in again and run Full resync in the new plugin.

If you use BRAT, add or update this repository there. BRAT installs it under the new id.

0.1.1

Choose a tag to compare

@wandermyz wandermyz released this 25 Aug 20:22

Fixes a sync failure when GitHub's compare output omits a blob SHA for a changed path — the plugin planned a request for /git/blobs/null and failed with a 422 on every attempt. Such a diff now falls back to a full sync, which resolves SHAs from the tree listing.

0.1.0

Choose a tag to compare

@wandermyz wandermyz released this 24 Aug 03:17

Sync now pushes local changes as well as pulling remote ones. Local edits
are committed via the Git Data API as a single commit per sync, with the
ref update as a fast-forward-only compare-and-swap so a concurrent push
from another device is detected rather than clobbered.

When both sides changed a file, the remote version takes the canonical
path and the local bytes are preserved beside it as a conflict copy, which
the next push sends up — so both versions exist on every device.

Guards: no push from a pull that failed verification, refusal to push a
deletion of more than 10% of synced files, and .obsidian excluded in both
directions so a repo can never overwrite plugin config or leak a token.

Also adds an end-to-end suite that runs the real engine against a real
GitHub repository over the live API.

0.0.2

Choose a tag to compare

@wandermyz wandermyz released this 24 Aug 00:12

Fixes incremental sync, which failed with "File already exists" and pulled no update.

The sync engine chose create-vs-update by asking Obsidian''s in-memory file index, which lags the disk right after a batch of files is written. An existing file therefore looked absent, createBinary was called on a path that was already there, and the resulting throw aborted the whole run. The initial sync was unaffected because the vault really was empty.

All file I/O now goes through vault.adapter, which reads the filesystem: one writeBinary call both creates and overwrites, so no existence check can go stale before the write.

Also in this release:

  • Nested folders are created one level at a time. mkdir does not create ancestors, so a commit introducing a path several levels deep previously failed.
  • The access token and per-device sync state moved out of data.json into local.json, so plugin settings can be kept in version control while the credential is gitignored. Exclude .obsidian/plugins/obsidian-github-sync/local.json.
  • "Verify access" moved under Sync and now exercises the configured sync repository and remote folder instead of a separate test repository.
  • The Sign in button updates to "Re-authenticate" immediately after signing in, without needing a manual refresh.

0.0.1

Choose a tag to compare

@wandermyz wandermyz released this 22 Aug 05:11

First installable build.

One-way sync from a GitHub repository into an Obsidian vault, over the REST API only — no Git binary and no isomorphic-git, so it runs on mobile including iOS.

  • OAuth device flow sign-in through the system browser, with automatic token refresh
  • Incremental sync: diffs against the last synced commit and fetches only changed blobs, falling back to a full tree walk on diverged history, force-push, or a truncated diff
  • Integrity verification: every written file is re-hashed as a git blob and checked against the SHA GitHub published
  • Sync on startup and periodic auto-sync
  • Never overwrites locally-edited files, and refuses to write anything under .obsidian/

Pushing local changes back to GitHub is not implemented yet.

Install with BRAT: add wandermyz/obsidian-github-sync as a beta plugin.