Folder Git
pendingby Octadira
Per-folder Git source control — manage separate Git repositories for each folder in your vault.
Obsidian Folder Git
Folder Git is an Obsidian plugin that brings VS Code-style Git source control to your vault. Unlike other Git plugins that force a single repository for the entire vault, Folder Git allows you to manage multiple independent Git repositories for individual folders.
Features
- Multi-Repo Support: Manage separate Git repositories for different folders within the same vault.
- VS Code-Inspired UI: Familiar Source Control panel with staged changes, commit input, and file status badges.
- Git Operations:
- Stage/Unstage specific files or all changes.
- Commit with message.
- Push/Pull to remote.
- View colored Diff for file changes.
- View History log per repository.
- GitHub Integration:
- Clone private repositories.
- Initialize new repositories and publish to GitHub automatically.
- Authentication via Personal Access Token.
- Auto-Backup: Configure auto-commit and auto-push intervals per repository.
- Context Menu Integration: Right-click folders to add them as repositories or open source control.
Installation
From Community Plugins (Recommended)
Once approved:
- Open Settings > Community Plugins
- Turn off Safe Mode
- Click Browse and search for Folder Git
- Install and Enable
Manual Installation
- Go to the Releases page.
- Download
main.js,manifest.json, andstyles.css. - Create a folder in your vault:
.obsidian/plugins/obsidian-folder-git/. - Copy the downloaded files into that folder.
- Reload Obsidian and enable the plugin.
Usage
Adding a Repository
- Click the Folder Git: Add Folder Repository command or use the ribbon icon.
- Select the folder you want to track.
- Choose a mode:
- Existing: Use an existing
.gitrepository in that folder. - Init: Initialize a new Git repository. Option to create a GitHub repo automatically.
- Clone: Clone a repository from a URL into the folder.
- Existing: Use an existing
Source Control View
- Repo Selector: Switch between configured repositories using the dropdown at the top.
- Changes: View staged, changed, and untracked files.
- Actions:
+to stage file.-to unstage file.↩to discard changes.- Click a file to view the Diff.
GitHub Authentication
To create new repositories or access private ones:
- Go to Settings > Folder Git.
- Generate a GitHub Personal Access Token (Classic) with
reposcope. - Paste the token in the settings and click Validate.
Development
- Clone this repository.
- Run
npm install. - Run
npm run devto start compilation in watch mode. - Copy
main.js,manifest.json,styles.cssto your test vault's plugin folder.
License
MIT
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.