Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Folder Git

octadiraoctadira985 downloads

Per-folder Git source control with GitHub and Forgejo support — manage a separate Git repository for each folder in your vault.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates14

Folder Git brings VS Code-style Git source control to Obsidian. Unlike plugins that treat the whole vault as a single repository, Folder Git lets you manage multiple independent Git repositories, one per folder. It works with GitHub and Forgejo / Gitea (including Codeberg and self-hosted instances).

Features

  • One repository per folder. Track any number of folders (or the vault root) as separate Git repositories, each with its own remote, branch and backup schedule.
  • Source Control panel. Repository list with change indicators, current branch with ahead/behind counts, and staged, changed, untracked and conflicted files.
  • Everyday Git operations.
    • Stage, unstage and discard individual files or everything at once. Discarding always asks for confirmation.
    • Commit staged changes, or stage everything and commit in one click. Press Ctrl/Cmd+Enter to commit. An empty message falls back to the repository's commit template.
    • Push, pull, sync (pull then push) and fetch. The first push sets the upstream branch automatically.
    • Colored diffs for working-tree and staged changes.
    • Resolve merge conflicts: keep your version or the incoming one per file (with confirmation), or edit the file and mark it as resolved. A banner shows while a merge is in progress and lets you abort it.
  • Branches. Click the branch name to switch. The ⋯ menu and command palette also create, merge and delete branches. Remote-only branches can be checked out as tracking branches. Deleting a branch that is not fully merged asks before forcing it.
  • Stash. Stash all changes (untracked files included) with an optional note. Stashes are listed in the panel with apply, pop and delete.
  • Fix the last commit. Amend last commit changes its message and adds whatever is staged. Undo last commit moves it back to the staged area. Both warn when the commit was already pushed.
  • History view. Browse commits per repository, 50 at a time with Load older commits, and open the diff of any file changed in a commit. Limit it to a single file (renames are followed) from the file's context menu or the Open history of current file command. In an expanded commit, Restore this version puts a file back to how it was in that commit (left unstaged so you can review it).
  • Status bar. Branch, ahead/behind counts and pending changes of the current repository. Click it to open Source Control. It turns red when the last push, pull, sync or auto-commit failed.
  • Sync errors. A failed push, pull, sync or background auto-commit/auto-push is shown as a warning on the repository in the Source Control panel, with the error message, until the next success. Background failures notify once, not on every interval.
  • GitHub and Forgejo integration.
    • Validate an access token and see which account is connected.
    • Create a new remote repository while adding a folder: under your account or one of your organizations, private or public.
    • Forgejo: create a new organization from the same dialog.
    • Clone private repositories over HTTPS.
  • Auto-backup. Per-repository auto-commit interval, commit message template (placeholders such as {{date}}, {{branch}} and {{files}}) and auto-push after every commit. Failures are shown in the panel and the status bar.
  • .gitignore tools. Built-in .gitignore editor, plus Add to / Remove from .gitignore in the file explorer context menu.
  • Context menu. Right-click a folder to add it as a repository. On a repository root folder you can open Source Control or History, pull, push, or edit .gitignore.

Requirements

  • Obsidian 1.11.4 or later, desktop only (Windows, macOS, Linux).
  • Git installed and available on your PATH, or its location set in the plugin settings.

Installation

From Community Plugins (recommended)

  1. Open Settings → Community plugins and turn off Restricted mode if needed.
  2. Select Browse and search for Folder Git.
  3. Select Install, then Enable.

Manual installation

  1. Download main.js, manifest.json and styles.css from the latest release.
  2. Copy them into <your vault>/.obsidian/plugins/folder-git/.
  3. Reload Obsidian and enable Folder Git in Settings → Community plugins.

Getting started

Add a repository

  1. Run Folder Git: Add folder repository from the command palette, or right-click a folder and choose Git: add repository.
  2. Select the folder to track.
  3. Choose a mode:
    • Use existing repo: the folder already contains a .git repository. Its remote is detected automatically.
    • Initialize new repo: runs git init in the folder.
    • Clone from URL: clones into a new subfolder, or directly into the selected folder if it is empty.
  4. Optionally, for existing or new repositories, choose Create remote repository on GitHub or Forgejo. Then pick the Owner: your account, one of your organizations, or (on Forgejo) a new organization.
  5. Select Add repository.

Source Control view

Open it from the ribbon icon or with Folder Git: Open source control.

  • Click a repository in the list to switch to it. The dot and counter show pending changes.
  • Header buttons: Refresh, Pull, Push, Sync, and a ⋯ menu with Fetch, Open history, Edit .gitignore, branch actions (switch, new, merge, delete), Stash, Amend / Undo last commit and Add folder repository. Click the branch name to switch branch.
  • On each file: + stages, − unstages, ↩ discards, and the file icon opens the note. Click the row to view its diff, or right-click for more actions.

Commands

Command Description
Open source control Open the Source Control panel
Open Git history Open the History view for a repository
Open history of current file Open the History view limited to the file you are editing
Switch branch / New branch / Stash changes (active repo) Branch and stash actions from the command palette
Add folder repository Start tracking a folder
Commit (active repo) Focus the commit message box
Commit all changes with default message (active repo) Stage everything and commit using the template (and push if auto-push is on)
Push / Pull / Sync / Fetch (active repo) Network operations
Edit .gitignore Open the .gitignore editor

The active repo is the one containing the file you are editing. Otherwise it is the one selected in the Source Control panel. If that is still ambiguous, you are asked to pick one.

Settings

General

Setting Default Description
Git binary path (empty) Path to the git executable (stored locally per device, never in data.json). Leave empty to use the one on your PATH. Takes effect after reloading the plugin.
Show untracked files On Show untracked files in the Source Control panel.
Status refresh interval 30 s How often git status runs for each repository. 0 turns auto-refresh off.

Per repository (under Configured repositories)

Setting Description
Remote URL Applied to the repository's remote when you leave the field.
Auto-push after commit Push after every commit made from the plugin, manual or automatic. On by default when the repository has a remote.
Auto-commit interval Minutes between automatic stage all + commit. 0 disables it.
Commit message template Used by auto-commit and when the commit message is empty. Placeholders: {{date}} (ISO date), {{time}} (local HH:MM), {{repo}} (folder, or the vault name for the vault root), {{branch}} and {{files}} (number of files in the commit).
Remove Stops tracking the folder. The .git folder and your files are left untouched.

Authentication

Tokens are only needed to create remote repositories and to push, pull or clone over HTTPS. SSH remotes keep using your SSH keys and need no token.

GitHub

  1. Create a personal access token:
    • Classic token: repo scope. Add read:org if you want your private organization memberships listed.
    • Fine-grained token: Contents and Administration read and write permissions. To create new repositories the token needs access to All repositories. For organization repositories, set the organization as the token's Resource owner.
  2. In Settings → Folder Git → GitHub, paste the token and select Validate.

Forgejo / Gitea / Codeberg

  1. In Settings → Folder Git → Forgejo, enter your instance URL, for example https://codeberg.org or https://git.example.com.
  2. On your instance, open Settings → Applications and generate an access token with:
    • repository: read and write
    • user: read
    • organization: read (to list your organizations), or read and write (to also create organizations)
  3. Paste the token and select Validate.

Privacy and security

Where tokens are stored

Tokens are stored outside the vault in Obsidian's built-in SecretStorage — never in <vault>/.obsidian/plugins/folder-git/data.json.

  • Vault sync & Git safety. Because tokens are not written to data.json, syncing your vault with Obsidian Sync, iCloud, Dropbox, Syncthing or a parent Git repository does not expose your tokens. Existing tokens saved in data.json by versions before 1.3.3 are migrated automatically and removed from data.json on load.
  • Vault root as a repository. When you add the vault root as a repository, the plugin still ensures .obsidian/plugins/folder-git/data.json is ignored and warns you if it was already committed in an earlier version (in that case run git rm --cached on it and revoke any previously committed tokens).
  • Per-device Git binary path. The custom Git binary path setting is also stored locally per device rather than in data.json, so opening a shared vault cannot override the executable that runs.
  • Least privilege. Use a fine-grained or narrowly scoped token with an expiry date, and revoke it if it ever leaks.

How tokens are used

  • API calls. When you validate a token, create a repository or organization, or list organizations, the token is sent in the Authorization header to api.github.com or to <your Forgejo instance>/api/v1. It is never put in a URL.
  • Git operations. During push, pull, sync, fetch and clone, the token is handed to that one Git process through environment variables. A command-line credential helper scoped to the exact origin (-c credential.<protocol>://<host>.helper=…) verifies both protocol and host from Git's stdin before answering. Nothing is written to .git/config, to a credentials file or to the remote URL.
  • Host matching. A token is only offered to an https:// remote whose host (and port) exactly matches github.com or your Forgejo instance, resolved against the branch's actual tracking remote. Redirects to other hosts and unrelated remotes never receive it.
  • Other credential helpers. For matching hosts, the plugin's helper replaces any configured helper (such as Git Credential Manager or the macOS keychain) for that command. For every other host, your normal Git configuration applies.
  • No prompts. Network operations run with GIT_TERMINAL_PROMPT=0, so Git fails instead of waiting for a password it cannot ask for.
  • Process environment. While a network operation runs, the token is in the Git process's environment. Other programs running as your user could read it there.
  • SSH remotes use your SSH keys and agent. The plugin never sends a token over SSH.

Plain http://

Tokens are never sent to public http:// remotes. Plain http:// Forgejo instances are only allowed for localhost and private/LAN addresses (such as 127.0.0.1, 192.168.x.x, 10.x.x.x, *.local), and require explicit confirmation before sending your token unencrypted.

Network access

The plugin only connects to api.github.com, the Forgejo instance you configure, and the Git remotes of your repositories. There is no telemetry, analytics or update check.

Local changes

  • The plugin runs Git only in folders strictly inside your vault (verified against path traversal and symlinks), plus git clone into the folder you choose.
  • It writes .gitignore only when you use the .gitignore editor or the Add to / Remove from .gitignore actions.
  • Git runs non-interactively with risky environment overrides (GIT_ASKPASS, GIT_EXEC_PATH, GIT_CONFIG*, GIT_EXTERNAL_DIFF, EDITOR, PAGER, etc.) stripped, while preserving GIT_SSH / GIT_SSH_COMMAND for SSH remotes.

Upgrading from 1.0.x

Versions up to 1.0.4 stored the GitHub token in a plaintext .git-credentials file in the plugin folder and pointed each repository's credential.helper at it. From 1.1.0 on, the plugin deletes that file when it loads and removes that credential.helper entry from each repository when it opens it.

If that file was ever synced, backed up or committed, revoke the old token and create a new one.

Troubleshooting

Problem Fix
"… is not a Git repository root" The selected folder must contain its own .git directory. Use Initialize new repo or pick the repository's top folder.
Git not found Install Git, or set Git binary path in settings (reload the plugin afterwards).
Push asks for credentials or fails with 401/403 Validate the matching token in settings and check its permissions. For other hosts, use SSH or your system's Git credential manager.
"No commits yet — commit before pushing" Make the first commit before pushing.
Push fails on a host that matches your token, even though Git Credential Manager has valid credentials For matching hosts only the plugin's token is used. Validate a working token, or switch the remote to SSH.
Organizations are not listed Grant the token organization read access (Forgejo) or read:org (GitHub classic), then press the reload button next to Owner.

Limitations

  • Desktop only. Git runs as an external process, which Obsidian mobile does not support.
  • Conflicts are resolved per file: keep one side wholesale, or edit the file yourself and mark it as resolved. There is no side-by-side merge editor. If your Git is configured to pull with rebase, my version and incoming version swap meaning during the rebase.
  • Amending or undoing a commit that was already pushed needs a force push, which the plugin does not do; use a terminal.
  • Branch rename, rebase, tags and partial (per-hunk) staging are not available.
  • Restoring a file from before it was renamed recreates it at its old path.
  • Tokens can be stored for one GitHub account and one Forgejo instance. Other HTTPS hosts rely on your system's Git credential setup.

Contributing

Bug reports and pull requests are welcome. See CONTRIBUTING.md for the development setup and release process, and CHANGELOG.md for version history.

License

MIT

HealthExcellent
ReviewSatisfactory
About
Manage multiple independent Git repositories, one per folder (or the vault root), inside your vault. A VS Code-style Source Control panel shows staged, changed, untracked and conflicted files with diffs, alongside a History view with per-file history and version restore. Stage, commit, amend or undo the last commit, push, pull, sync, fetch, stash, manage branches, resolve merge conflicts, clone or initialize repositories, and set per-repository auto-commit and auto-push. Works with GitHub and Forgejo/Gitea, including Codeberg and self-hosted instances: create remote repositories under your account or an organization, create Forgejo organizations, and use private HTTPS remotes. Access tokens are stored outside the vault in Obsidian's SecretStorage and passed to Git in memory only via a host-verified credential helper; custom Git binary paths are stored per device. Desktop only; requires Obsidian 1.11.4+ and Git.
GitIntegrationsSidebar
Details
Current version
1.3.4
Last updated
23 hours ago
Created
10 months ago
Updates
14 releases
Downloads
985
Compatible with
Obsidian 1.11.4+
Platforms
Desktop only
License
MIT
Report bugRequest featureReport plugin
Author
octadiraoctadira
GitHuboctadira
  1. Community
  2. Plugins
  3. Git
  4. Folder Git

Related plugins

Open in Terminal

Open your vault in a new terminal window or launch Claude Code, Codex CLI, or Gemini CLI directly from a terminal.

Claude Sidebar

Run Claude Code in your sidebar.

GitHub

Git Sync

Sync your vault across all devices using your own GitHub account. Free forever.

Notebook Navigator

A better file browser and calendar inspired by Apple Notes, Bear, Evernote and Day One.

BRAT

Easily install a beta version of a plugin for testing.

LanguageTool Integration

Advanced grammar and spell checking, powered by LanguageTool.

Self-hosted LiveSync

Sync vaults securely to self-hosted servers or WEBRTC.

Fast Note Sync

Real-time sync of your vaults across server, mobile, and web; shareable with anyone; supports REST and MCP integrations to build your personal AI knowledge base.

Tag Wrangler

Rename, merge, toggle, and search tags from the tag pane.

Custom Frames

Turn web apps into panes using iframes with custom styling. Also comes with presets for Google Keep, Todoist and more.