zhu47 downloadsAdds a custom Git bridge for committing nested repositories in an Obsidian vault.
A customized Git plugin for Obsidian that solves the problem of uploading or committing nested sub-repositories.
.git..git or .git_metadata.In Exclusive rename mode, .git is renamed to .git_metadata before the commit and renamed back afterward. In Sidecar copy mode, only .git/HEAD is temporarily renamed, the metadata is copied to .git_metadata, and both directories remain.
Scan child .git
-> rename .git/HEAD to HEAD__subbridge
-> copy .git to .git_metadata
-> stage and commit with Obsidian Git
-> restore .git/HEAD
The bridge currently covers the Commit all path used by Commit all and the default Commit-and-sync action. Staged-only commits are not automatically bridged.
For a detailed comparison, see Metadata modes.
pnpm install --frozen-lockfile
pnpm run build
Copy main.js, manifest.json, and styles.css into:
.obsidian/plugins/git-subbridge/
Then enable Git Subbridge in Obsidian. Disable the original Git plugin while using this plugin so both plugins do not operate on the same repository at the same time.
.git folders, commits the parent repository, and restores the original folder names.This project is distributed under the MIT License. See LICENSE.