obsidian-git

Vinzent03MIT活跃维护

把 Git 版本控制接进 Obsidian 笔记库,支持自动提交与同步,让笔记也能像代码一样追踪改动、备份和跨设备同步。

Integrate Git version control with automatic commit-and-sync and other advanced features in Obsidian.md

2.43.0发布于 2026-11-05 02:04 UTC12,255star +17 / 7 天671fork同步于 2026-11-10 17:28 UTC

怎么上手

由 README 提炼,执行前请确认
在 Obsidian 社区插件市场搜索 Git 并安装启用;或克隆仓库后执行 npm install && npm run build
硬件要求按 README 说明

README 未说明硬件要求;桌面端需系统已安装 Git,移动端基于 isomorphic-git,受内存限制,大仓库可能崩溃

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

把 Git 版本控制集成进 Obsidian 笔记库,自动提交同步并可视化查看改动

把 Git 版本控制接进 Obsidian 笔记库,支持自动提交与同步,让笔记也能像代码一样追踪改动、备份和跨设备同步。

核心能力

  • 按计划自动执行 commit-and-sync(提交、拉取、推送)
  • 内置源码控制视图,可暂存、取消暂存、提交和查看差异
  • 提供历史视图浏览提交日志与改动文件
  • 在编辑器内高亮冲突并一键保留本地、远端或两者
  • 桌面端支持子模块与行级改动标记

容易踩的坑

移动端实现非常不稳定,不支持 SSH 认证、rebase 和子模块;Linux 上 Snap 不支持、Flatpak 不推荐,建议用 AppImage;部分 Git 服务的 HTTPS/SSH 认证需按认证指南额外配置

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本2.43.0
  1. 2.43.0最新正式版2026-11-05 · 2026-11-05 02:04 UTC

    See the changelog for details.

  2. 2.42.02026-10-18 · 2026-10-18 15:40 UTC
    查看更新说明

    See the changelog for details.

  3. 2.41.12026-10-02 · 2026-10-02 10:39 UTC
    查看更新说明

    See the changelog for details.

  4. 2.41.02026-10-01 · 2026-10-01 21:04 UTC
    查看更新说明

    Git 2.41.0

    This release makes merge conflicts easier to resolve inside Obsidian.

    When a merge has conflicts, Source Control now lists the affected files and shows how many conflict blocks remain in each one. Open a file to review highlighted blocks and choose Keep ours, Keep theirs, or Keep both. You can also resolve all blocks in a file at once or edit them manually. When a file’s count reaches zero, select the plus icon to mark it resolved. Once every conflict is resolved, commit the merge and push as usual. A merge status button provides these steps in the app.

    Other additions

    • Open a file’s content at a specific commit from the History view.
    • Initialize or clone a repository directly from Source Control when no repository is found.
    • Optionally limit file operations to the vault when it sits inside a larger Git repository. Repository-wide operations such as pull and checkout still affect the whole repository.
    • Configure automatic stashing when pulling with rebase on desktop.
    • Migrated to the new declarative settings definition so settings can be searched for

    This release also improves mobile amend support, fixes several diff and Source Control issues, and handles merge commits with no staged file changes.

    Requires Obsidian 1.13.0 or later. Full changelog

    See the changelog for details.

  5. 2.40.02026-09-17 · 2026-09-17 00:01 UTC
    查看更新说明

    See the changelog for details.

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Git Plugin for Obsidian

    A powerful community plugin for Obsidian.md that brings Git integration right into your vault. Automatically commit, pull, push, and see your changes — all within Obsidian.

    Documentation

    All setup instructions (including mobile), common issues, tips, and advanced configuration can be found in the full documentation.

    Mobile users: The plugin is highly unstable. Please check the dedicated Mobile section below.

    Key Features

    • Automatic commit-and-sync (commit, pull, and push) on a schedule.
    • Auto-pull on Obsidian startup
    • Source Control View to stage/unstage, commit and diff files - Open it with the Open source control view command.
    • History View for browsing commit logs and changed files - Open it with the Open history view command.
    • Diff View for reviewing changes side by side and staging or resetting individual hunks - Open it with the Open diff view command.
    • Conflict resolution in the editor with highlighted changes and buttons to keep either version, both versions, or the common ancestor when available.
    • Signs in the editor to indicate added, modified, and deleted lines/hunks (desktop only).
    • Submodule support for managing multiple repositories (desktop only and opt-in)
    • GitHub integration to open files and history in your browser

    For detailed file history, consider pairing this plugin with the Version History Diff plugin.

    UI Previews

    Source Control View

    Manage your file changes directly inside Obsidian, including staging and unstaging individual files and committing them. The main Commit action commits staged changes when present. The actions menu provides explicit staged-only and all-changes alternatives, plus amending the previous commit on desktop.

    Source Control View

    History View

    Show the commit history of your repository. The commit message, author, date, and changed files can be shown. Author and date are disabled by default as shown in the screenshot, but can be enabled in the settings.

    History View

    Diff View

    Compare versions side by side with highlighted changes. Review, stage, or reset individual hunks without leaving the diff view. Open it from the source control view or via the Open diff view command.

    Diff View

    Signs in the Editor

    View line-by-line changes directly in Live Preview with added, modified, and deleted line/hunk indicators. You can stage and reset changes right from the signs. There are also commands to navigate between hunks and stage/reset hunks under the cursor. Needs to be enabled in the plugin settings.

    Editor signs with a hunk preview and stage/reset controls

    Conflict Resolution

    Resolve conflicting changes in Live Preview without leaving your note. Highlighted sections show your version and the incoming version, with buttons to keep ours, theirs, or both. The bar at the top lets you apply a choice to every conflict in the file. Source Control lists conflicted files and shows how many conflict blocks remain.

    Conflict resolution in Live Preview, with local and incoming changes and the Source Control conflict list

    When Git includes the common ancestor (for example, with merge.conflictStyle=diff3), you can also compare and keep the base version.

    Conflict resolution with the common ancestor and Keep base controls

    After reviewing the result, mark the file as resolved in Source Control, then commit to finish the merge. See the conflict resolution guide for the full workflow.

    Available Commands

    Not exhaustive - these are just some of the most common commands. For a full list, see the Command Palette in Obsidian.

    • Changes
      • List changed files: Lists all changes in a modal
      • Open diff view: Open diff view for the current file
      • Stage current file
      • Unstage current file
      • Discard all changes: Discard all changes in the repository
    • Commit
      • Commit: Commits staged changes when present. If nothing is staged, either stages and commits all changes or stops, depending on the Stage all changes when nothing is staged setting
      • Commit with specific message: Same as above, but with a custom message
      • Commit all changes: Commits all changes without pushing
      • Commit all changes with specific message: Same as above, but with a custom message
    • Commit-and-sync
      • Commit-and-sync: With default settings, this will commit all changes, pull, and push
      • Commit-and-sync with specific message: Same as above, but with a custom message
      • Commit-and-sync and close: Same as Commit-and-sync, but if running on desktop, will close the Obsidian window. Will not exit Obsidian app on mobile.
    • Remote
      • Push, Pull
      • Edit remotes: Add new remotes or edit existing remotes
      • Remove remote
      • Clone an existing remote repo: Opens dialog that will prompt for URL and authentication to clone a remote repo
      • Open file on GitHub: Open the file view of the current file on GitHub in a browser window. Note: only works on desktop
      • Open file history on GitHub: Open the file history of the current file on GitHub in a browser window. Note: only works on desktop
    • Manage local repository
      • Initialize a new repo
      • Create new branch
      • Delete branch
      • CAUTION: Delete repository
    • Miscellaneous
      • Open source control view: Opens side pane displaying Source control view
      • Open history view: Opens side pane displaying History view
      • Edit .gitignore
      • Add file to .gitignore: Add current file to .gitignore

    Desktop Notes

    Community scorecard

    The Obsidian community scorecard reports automated code checks, including warnings about shell execution and direct filesystem access. On desktop, this plugin needs those capabilities to run your installed Git and work with repository metadata and Git configuration beyond Obsidian's vault API. These requirements contribute to the Review rating, so read it alongside the individual findings and in the context of native Git integration.

    Authentication

    Some Git services may require further setup for HTTPS/SSH authentication. Refer to the Authentication Guide

    Obsidian on Linux

    • Snap is not supported due to its sandboxing restrictions.
    • Flatpak is not recommended, because it doesn't have access to all system files. They are actively fixing many issues, but there are still issues. Especially with more advanced setups.
    • Please use AppImage or a full access installation of your system's package manager instead (Linux installation guide)

    Mobile Support (Experimental)

    The Git implementation on mobile is very unstable! I would not recommend using this plugin on mobile, but try other syncing services.

    One such alternative is GitSync, which is available on both Android and iOS. It is not associated with this plugin, but it may be a better option for mobile users. A tutorial for setting it up can be found here.

    The Git plugin works on mobile thanks to isomorphic-git, a JavaScript-based re-implementation of Git - but it comes with serious limitations and issues. It is not possible for an Obsidian plugin to use a native Git installation on Android or iOS.

    Mobile Feature Limitations

    • No SSH authentication (isomorphic-git issue)
    • Limited repo size, because of memory restrictions
    • No rebase merge strategy
    • No submodules support

    Performance Caveats

    [!caution] Depending on your device and available free RAM, Obsidian may

    • crash on clone/pull
    • create buffer overflow errors
    • run indefinitely.

    It's caused by the underlying git implementation on mobile, which is not efficient. I don't know how to fix this. If that's the case for you, I have to admit this plugin won't work for you. So commenting on any issue or creating a new one won't help. I am sorry.

    Tips for Mobile Use:

    If you have a large repo/vault I recommend staging individual files and setting automatic commit globs to Include matches with an empty list, so automatic commits use only staged files.

    Contact & Credits

    • The Line Authoring feature was developed by GollyTicker, so any questions may be best answered by her.
    • This plugin was initially developed by denolehov. Since March 2021, it's me Vinzent03 who is developing this plugin. That's why the GitHub repository got moved to my account in July 2024.
    • If you have any kind of feedback or questions, feel free to reach out via GitHub issues.

    Support

    If you find this plugin useful and would like to support its development, you can support me on Ko-fi.

    ko-fi