obsidian-git README

The project's README from github.com/Vinzent03/obsidian-git. As one markdown file: README.md.

Obsidian Git Plugin

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

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 like stage/unstage individual files and commit them.

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 with a clear and concise diff viewer. 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 the editor with added, modified, and deleted line/hunk indicators. You can stage and reset changes right from the signs. There also commands to navigate between hunks and stage/reset hunks under the cursor. Needs to be enabled in the plugin settings.

Signs

Available Commands

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

💻 Desktop Notes

🔐 Authentication

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

Obsidian on Linux

📱 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

⚠️ 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 to stage individual files and only commit staged files.

🙋 Contact & Credits

☕ Support

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

ko-fi

obsidian-git (Vinzent03/obsidian-git)

Searching Database…

这是什么?Obsidian Git 是一个社区插件,可以把 Git 版本控制直接带进 Obsidian.md,让你在应用内提交、拉取和推送笔记库的更改。
这是独立应用,还是运行在 Obsidian 内部?它是运行在 Obsidian 应用内的插件,会为你现有的笔记库添加源代码管理视图、历史视图、差异视图,以及编辑器边栏标记。
我该如何开始在笔记库中使用它?从 Obsidian 的社区插件中安装,然后使用插件提供的命令初始化新仓库,或克隆已有的远程仓库;之后即可使用 Commit-and-sync 按计划自动提交、拉取和推送。
我需要单独安装 Git 吗,还是它自带?在桌面端,插件依赖已安装的原生 Git;在移动端,由于无法运行真正的 Git 程序,它会改用 isomorphic-git,这是一个 JS 重新实现的版本。
它在移动端表现好吗?移动端支持仍处于实验阶段,作者明确警告其非常不稳定:克隆或拉取时可能崩溃,不支持 SSH 认证,仓库大小受限,不支持变基,也不支持子模块。
在 Linux、macOS 和 Windows 上表现一致吗?桌面端都支持,但在 Linux 上不支持 Snap 版 Obsidian,由于沙盒限制也不建议使用 Flatpak;推荐改用包管理器安装或 AppImage。
一个笔记库里能同时管理多个 Git 仓库吗?可以,它提供可选的子模块支持,用于管理多个仓库,但这一功能仅限桌面端。
编辑笔记时能逐行查看更改吗?可以,它会在编辑器中直接显示新增、修改和删除的行及代码块标记,并提供暂存或重置单个代码块的命令。
能在 Obsidian 内直接查看文件在 GitHub 上的历史吗?可以,有命令可以直接在浏览器中打开当前文件或其历史记录的 GitHub 页面,但这仅在桌面端可用。
如果移动端同步太不稳定,有什么好的替代方案?作者推荐 GitSync,这是一款与本插件无关联的独立应用,同时支持 Android 和 iOS,可作为更可靠的移动端同步选择。
Creator
Vinzent03
Size
6.5 MB
Stars
12.1K
Age
5y
Commits · 90 Days