obsidian-git README

The project's README from github.com/Vinzent03/obsidian-git. As one markdown file: 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)

Searching Database…

What is this?Obsidian Git is a community plugin that brings Git version control right into Obsidian.md, letting you commit, pull, and push your vault changes from inside the app.
Is this a standalone app or does it run inside Obsidian?It's a plugin that runs inside the Obsidian app, adding a Source Control view, History view, Diff view, and editor gutter signs to your existing vault.
How do I start using it on my vault?Install it from Obsidian's community plugins, then initialize a new repo or clone an existing remote repo using the plugin's commands; from there you can use Commit-and-sync to commit, pull, and push on a schedule.
Do I need Git installed separately, or does it bring its own?On desktop the plugin relies on an installed native Git; on mobile it falls back to isomorphic-git, a JS re-implementation, since a real Git binary can't run there.
Does it work well on mobile?Mobile support is experimental and the author explicitly warns it is highly unstable, with crashes on clone/pull, no SSH auth, limited repo size, no rebase, and no submodules.
Does it work the same across Linux, macOS, and Windows?Yes on desktop, but on Linux the Snap build of Obsidian isn't supported and Flatpak is discouraged because of sandboxing restrictions; a package-manager install or AppImage is recommended instead.
Can I manage more than one Git repo from a single vault?Yes, it has opt-in submodule support for managing multiple repositories, but this is desktop-only.
Can I see line-by-line changes while editing a note?Yes, it can show added/modified/deleted line and hunk signs directly in the editor, with commands to stage or reset individual hunks.
Can I open a file's history on GitHub from inside Obsidian?Yes, there are commands to open the current file or its history directly on GitHub in your browser, though this only works on desktop.
What's a good alternative if mobile sync is too unstable for me?The author suggests GitSync, a separate unaffiliated app available on both Android and iOS, as a more reliable mobile syncing option.
Creator
Vinzent03
Size
6.5 MB
Stars
12.3K
Age
6y
Commits · 90 Days