No description
Find a file
Claude 692fc0f293 build(compat): derive the compat typecheck's target version dynamically
The 1.11 compatibility gate previously hardcoded the target Obsidian
version in two places (an obsidian-1_11 alias devDependency and a static
tsconfig.compat.json), so bumping minAppVersion would silently leave the
check pinned to the old version.

Replace both with scripts/typecheck-compat.mjs, which reads the target from
versions.json (the entry for the current manifest version, falling back to
manifest.minAppVersion), installs the matching Obsidian typings into a
git-ignored cache on demand, and type-checks src against them. The gate now
follows minAppVersion automatically with no code changes.

Also fold `typecheck:compat` into `npm run build` so it runs wherever the
build runs (the husky pre-commit hook and any CI step that builds).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SSikT9ZAfQF8K4SE3DatD3
2026-07-07 01:53:28 +00:00
.agents/skills chore(skills): install clean-code, design-taste-frontend, frontend-design skills 2026-07-05 05:15:47 +00:00
.claude feat: support hidden file sync and expand binary extension list 2026-05-22 03:08:15 +00:00
.github/workflows Merge remote-tracking branch 'origin/claude/git-files-sync-issue-31-54izdm' into claude/trusting-volta-qlg8bk 2026-06-28 04:50:34 +00:00
.husky feat: integrate SyncConflictModal into SyncManager 2026-04-01 16:43:10 +00:00
docs feat(sync): real symbolic link support (GitHub) with configurable handling 2026-06-28 05:14:35 +00:00
imgs docs: update intro video with refreshed content 2026-06-19 11:59:00 +00:00
scripts build(compat): derive the compat typecheck's target version dynamically 2026-07-07 01:53:28 +00:00
src fix(compat): support Obsidian down to 1.11.0 2026-07-07 01:53:28 +00:00
tests fix(compat): support Obsidian down to 1.11.0 2026-07-07 01:53:28 +00:00
.editorconfig Initial commit 2026-04-01 00:23:18 +08:00
.gitignore build(compat): derive the compat typecheck's target version dynamically 2026-07-07 01:53:28 +00:00
.npmrc Initial commit 2026-04-01 00:23:18 +08:00
.releaserc.json fix(ci): switch to shared workflow v1 and fix repository url 2026-06-16 03:53:29 +00:00
AGENTS.md feat: integrate SyncConflictModal into SyncManager 2026-04-01 16:43:10 +00:00
CHANGELOG.md chore(release): 1.2.0 [skip ci] 2026-07-05 07:20:33 +00:00
CLAUDE.md docs: fix CLAUDE.md to match actual codebase and remove subagent delegation directives (#32) 2026-06-27 19:08:51 +08:00
esbuild.config.mjs Initial commit 2026-04-01 00:23:18 +08:00
eslint.config.mts feat: support hidden file sync and expand binary extension list 2026-05-22 03:08:15 +00:00
fix_order.mjs fix: enable automatic versioning and sync manifest to 1.1.0 2026-04-24 18:32:29 +00:00
LICENSE docs: overhaul README and add Traditional Chinese usage guide 2026-04-24 17:33:19 +00:00
manifest.json fix(compat): support Obsidian down to 1.11.0 2026-07-07 01:53:28 +00:00
package-lock.json build(compat): derive the compat typecheck's target version dynamically 2026-07-07 01:53:28 +00:00
package.json build(compat): derive the compat typecheck's target version dynamically 2026-07-07 01:53:28 +00:00
pr_body.md fix: resolve SonarCloud Quality Gate failures and improve marketplace readiness (#10) 2026-04-25 23:35:32 +08:00
README.md docs: restyle README, host demo videos on R2, use official download stats (#44) 2026-07-06 10:31:33 +08:00
ruleset_update.json refactor: fix quality gate issues, improve type safety and pagination (#21) 2026-04-27 02:16:26 +08:00
skills-lock.json chore(skills): install clean-code, design-taste-frontend, frontend-design skills 2026-07-05 05:15:47 +00:00
sonar-project.properties fix: resolve SonarCloud Quality Gate failures and improve marketplace readiness (#10) 2026-04-25 23:35:32 +08:00
styles.css refactor(ui): unify Sync Status icons via Lucide setIcon 2026-06-26 06:22:53 +00:00
targeted_append.mjs chore: update author to ClaudiaFang and repo name to git-files-sync 2026-04-24 18:46:31 +00:00
tsconfig.json fix: resolve obsidian community guidelines and lint errors 2026-04-25 03:13:04 +00:00
USAGE_zh.md docs: restyle README, host demo videos on R2, use official download stats (#44) 2026-07-06 10:31:33 +08:00
version-bump.mjs fix: resolve obsidian community guidelines and lint errors 2026-04-25 03:13:04 +00:00
versions.json fix(compat): support Obsidian down to 1.11.0 2026-07-07 01:53:28 +00:00
vitest.config.ts fix: SonarCloud analysis failure and quality gate issues 2026-04-25 06:10:55 +00:00

Git File Sync

Selective, file-by-file sync between your vault and GitHub, GitLab, or Gitea.

CI Release Downloads License

Releases · 繁體中文使用說明 · Changelog

Push, pull, diff, and resolve conflicts — file by file, not whole-vault. Unlike full-vault sync solutions, Git File Sync gives you granular control over exactly what leaves your device, so you can keep personal notes private while sharing project files through a real Git repository.

GitHub GitLab Gitea

sync-status The Sync Status View gives a bird's-eye view of your vault, letting you selectively push, pull, or diff modified files.

What's inside

  • File-by-file control — Sync individual notes or whole folders, not your entire vault. No lock-in to a single sync provider for everything.
  • Three Git providers — GitHub, GitLab (including self-hosted), and Gitea, all behind one consistent UI.
  • Visual diffing — A built-in diff viewer compares local and remote versions side-by-side before anything is overwritten.
  • Conflict resolution — When local and remote both changed, resolve manually with a dedicated conflict tool instead of guessing which version wins.
  • Works on mobile — Full support for Obsidian Mobile with a touch-friendly sync dashboard.

Sync Status View

A single dashboard shows the state of every tracked file:

  • Status filtering — instantly see what's modified, new, or missing.
  • Visual diffs — line-by-line comparison of local vs. remote before syncing.
  • Remote-only detection — spot files that exist on GitHub/GitLab/Gitea but haven't been pulled into the vault yet.

conflict The built-in diff viewer compares local and remote changes before you push or pull.

Providers

Provider Hosting Min. version
GitHub github.com · GitHub Enterprise
GitLab gitlab.com · self-hosted GitLab 13.0+
Gitea self-hosted Gitea 1.12+

Gitea note: the plugin talks to the Gitea API v1 (/api/v1) and resolves branch names to commit SHAs before fetching the file tree, which is what makes 1.12+ the floor.

Configuration

Plugin Settings Pick a provider and supply its credentials in Settings > Git File Sync.

Provider Required info Token scope
GitHub GitHub Personal access token, owner, repo name repo
GitLab GitLab Personal access token, project ID, base URL api
Gitea Gitea Personal access token, base URL, owner, repo name (all)
  • GitHub token: Settings → Developer settings → Personal access tokens → repo scope.
  • GitLab token: User settings → Access tokens → api scope. Base URL defaults to https://gitlab.com; change it for self-hosted instances.
  • Gitea token: User settings → Applications → Access tokens. Point the base URL at your instance (e.g. https://gitea.example.com).

Other settings: branch to sync against (default main), root path prefix inside the repo, vault folder to scope which notes are tracked, and symbolic link handling (real — recreate the link, GitHub only; follow — sync the target's content; skip). See Symbolic link handling for details.

Daily workflow

Pushing:

  • One note — the cloud icon in the ribbon, or the command Push current file to GitLab/GitHub/Gitea.
  • Several notes — open the Sync Status View, filter to Modified, select files, click Push selected.
  • From the file tree — right-click any file and choose Push to GitLab/GitHub/Gitea.

Pulling:

  1. Open the Sync Status View and click Refresh status.
  2. Files with remote updates show as Modified or Remote only.
  3. Select them and click Pull selected. Pulling overwrites local changes — if both sides changed, the conflict tool opens instead.

Resolving a conflict:

  1. The Conflict Resolution window opens automatically.
  2. Left pane is your Local version, right pane is Remote.
  3. Choose Keep Local (overwrite remote on next push) or Keep Remote (accept remote, overwrite local).

On mobile: swipe from the left to open the ribbon and the Sync Status View, pull before you start editing, push when you're done.

Installation

  1. Open Settings > Community plugins and turn off restricted mode.
  2. Click Browse, search for Git File Sync, click Install, then Enable.

Manual

  1. Download main.js, manifest.json, and styles.css from the latest release.
  2. Create <vault>/.obsidian/plugins/git-file-sync/.
  3. Copy the three files into that folder.
  4. Reload Obsidian and enable the plugin under Settings > Community plugins.

Quick start

  1. Configure a provider in Settings > Git File Sync (see Configuration).
  2. Open the Sync Status View — the list icon in the ribbon, or run Open sync status view from the Command Palette.
  3. Click Refresh status to compare your vault against the remote repo.
  4. Select files and Push selected or Pull selected as needed.

Commands:

Command What it does
Open sync status view Open the sync dashboard
Push current file to GitLab/GitHub/Gitea Push the active note
Pull current file to GitLab/GitHub/Gitea Pull the active note
Push all files Push every tracked, changed file
Pull all files Pull every tracked, changed file

Privacy and security

  • Local storage — personal access tokens are stored locally in the plugin's data folder inside your vault, and are only ever sent to the Git provider you configured.
  • No telemetry — the plugin collects no usage data or analytics.

Requirements

  • Obsidian 1.13.0 or later
  • Desktop and mobile supported

Development

git clone https://github.com/firstsun-dev/git-files-sync.git
npm install

npm run dev    # watch build
npm run build  # type-check + production build
npm run test   # vitest suite
npm run lint   # eslint

License

MIT


Created by ClaudiaFang