octadira358 downloadsPer-folder Git source control with GitHub and Forgejo support — manage a separate Git repository for each folder in your vault.
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).
Ctrl/Cmd+Enter to commit. An empty message falls back to the repository's commit template.{{date}} placeholder) and auto-push after every commit..gitignore tools. Built-in .gitignore editor, plus Add to / Remove from .gitignore in the file explorer context menu..gitignore.PATH, or its location set in the plugin settings.main.js, manifest.json and styles.css from the latest release.<your vault>/.obsidian/plugins/folder-git/..git repository. Its remote is detected automatically.git init in the folder.Open it from the ribbon icon or with Folder Git: Open source control.
.gitignore and Add folder repository.+ stages, − unstages, ↩ discards, and the file icon opens the note. Click the row to view its diff, or right-click for more actions.| Command | Description |
|---|---|
| Open source control | Open the Source Control panel |
| Open Git history | Open the History view for a repository |
| 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.
General
| Setting | Default | Description |
|---|---|---|
| Git binary path | (empty) | Path to the git executable. 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. {{date}} becomes the current ISO date. |
| Remove | Stops tracking the folder. The .git folder and your files are left untouched. |
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.
repo scope. Add read:org if you want your private organization memberships listed.https://codeberg.org or https://git.example.com.repository: read and writeuser: readorganization: read (to list your organizations), or read and write (to also create organizations)Tokens are saved unencrypted in the plugin's settings file: <vault>/.obsidian/plugins/folder-git/data.json. Anything that copies that file copies your tokens.
.obsidian/. When you add the vault root as a repository, the plugin adds .obsidian/plugins/folder-git/data.json to the vault's .gitignore (unless Git already ignores it). It also warns you if the file is already committed; in that case run git rm --cached on it and revoke the tokens if you pushed it.data.json to your other devices. Exclude the file, or accept that the token lives there too.Authorization header to api.github.com or to <your Forgejo instance>/api/v1. It is never put in a URL.-c credential.helper=…) reads them. Nothing is written to .git/config, to a credentials file or to the remote URL.https:// remote whose host (and port) exactly matches github.com or your Forgejo instance. Other remotes never see it.GIT_TERMINAL_PROMPT=0, so Git fails instead of waiting for a password it cannot ask for.http://Tokens are never sent to http:// remotes, with one exception. If you configure a Forgejo instance on http://, its http:// remotes receive the token unencrypted, and the plugin warns you when you validate it.
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.
git clone into the folder you choose..gitignore only when you use the .gitignore editor or the Add to / Remove from .gitignore actions.GIT_SSH_COMMAND, EDITOR or GIT_ASKPASS apply exactly as they do in a terminal.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.
| 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. |
Bug reports and pull requests are welcome. See CONTRIBUTING.md for the development setup and release process, and CHANGELOG.md for version history.