obsidian-git README

README проекта с github.com/Vinzent03/obsidian-git. Одним файлом markdown: README.md.

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

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.

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

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 staging individual files and setting automatic commit globs to Include matches with an empty list, so automatic commits use only 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)

Ищем в базе…

Что это такое?Obsidian Git — это сторонний плагин, который добавляет в Obsidian.md систему контроля версий Git прямо в приложение. С его помощью можно создавать коммиты, делать pull и push изменений вашего хранилища, не выходя из Obsidian.
Это отдельное приложение или оно работает внутри Obsidian?Это плагин, который работает внутри приложения Obsidian и добавляет в ваше хранилище панель Source Control, панель History, панель Diff и значки изменений на полях редактора.
Как начать пользоваться им в моём хранилище?Установите его из раздела сторонних плагинов Obsidian, затем создайте новый репозиторий или клонируйте существующий удалённый репозиторий с помощью команд плагина. После этого можно использовать Commit-and-sync, чтобы по расписанию создавать коммиты, делать pull и push.
Нужно ли устанавливать Git отдельно или он поставляется вместе с плагином?На компьютере плагин использует уже установленный в системе Git. На мобильных устройствах он переходит на isomorphic-git, реализацию Git на JavaScript, так как полноценная программа Git там не запускается.
Хорошо ли он работает на телефоне?Поддержка мобильных устройств экспериментальная: автор прямо предупреждает, что она очень нестабильна. Возможны сбои при клонировании и pull, нет аутентификации по SSH, ограничен размер репозитория, не поддерживаются rebase и подмодули.
Одинаково ли он работает в Linux, macOS и Windows?На компьютерах — да. Но в Linux не поддерживается сборка Obsidian в формате Snap, а Flatpak не рекомендуется из-за ограничений песочницы. Вместо них лучше установить Obsidian через менеджер пакетов или в формате AppImage.
Можно ли управлять несколькими Git-репозиториями из одного хранилища?Да, есть необязательная поддержка подмодулей, которая позволяет работать с несколькими репозиториями, но только на компьютере.
Можно ли видеть построчные изменения во время редактирования заметки?Да, плагин может показывать прямо в редакторе значки добавленных, изменённых и удалённых строк и фрагментов, а также предоставляет команды, чтобы добавлять в индекс (stage) и откатывать (reset) отдельные фрагменты.
Можно ли открыть историю файла на GitHub прямо из Obsidian?Да, есть команды, которые открывают текущий файл или его историю прямо на GitHub в браузере, но это работает только на компьютере.
Что использовать, если мобильная синхронизация слишком нестабильна?Автор советует GitSync — отдельное приложение, не связанное с этим плагином, доступное на Android и iOS, как более надёжный вариант мобильной синхронизации.
Автор
Vinzent03
Размер
6.5 MB
Звёзды
12.3K
Возраст
6 г
Коммиты · 90 дней