README file from
GithubGit Viewer
Git Viewer is a lightweight Git status, history, and selected-file commit tool for Obsidian. It is built for people who want to stay inside Obsidian, see exactly which vault files changed, open those files, make intentional commits, and inspect recent commit history without launching a heavier Git client or Visual Studio Code.
Features
- Shows Git status in a compact Obsidian sidebar view.
- Provides compact Changes and History tabs.
- Groups files into Staged, Changed, Untracked, Deleted, Renamed, and Conflicted.
- Opens files inside Obsidian when they are inside the current vault.
- Omits hidden/internal Git paths that Obsidian cannot open as vault files.
- Commits only explicitly selected files with a required commit message.
- Uses a temporary Git index for commits so unrelated staged or unstaged files are not included.
- Shows the latest 50 commits with short hash, subject, author, and timestamp.
- Shows read-only commit details with full hash, message body, and changed files.
- Uses local Git porcelain output through the
gitCLI. - Refreshes manually and after vault file events.
- Makes no network requests from plugin code.
Non-goals
Git Viewer deliberately does not include:
- pull
- clone
- fetch
- merge
- rebase
- branch create/switch/delete
- force push
- push
- stage/unstage
- discard/reset/delete
- conflict resolution
- automatic sync
The plugin is a status and history viewer with one narrow write action: commit selected files. It does not sync, pull, push, or manage branches.
Roadmap
Commit selected files
Commit support is intentionally scoped and explicit:
- select files with checkboxes
- enter a commit message
- preview exactly which files will be committed
- commit through a temporary index or equivalent restore-safe strategy
- never accidentally include unrelated staged or unstaged files
Git Viewer does not use a naive git add <files> && git commit flow, because that can disturb existing staged state in busy vaults.
Installation
Community plugin directory
Install from the Obsidian Community directory or search for Git Viewer in Settings → Community plugins → Browse.
Manual installation
- Download
main.js,manifest.json, andstyles.cssfrom the latest release. - Create this folder in your vault:
.obsidian/plugins/git-viewer/. - Put the downloaded files in that folder.
- Reload Obsidian.
- Enable Git Viewer in Settings -> Community plugins.
BRAT installation
For beta testing, install the plugin with BRAT using this repository URL:
https://github.com/viggomeesters/obsidian-git-viewer
Usage
Open the command palette and run Git Viewer: Open, or click the Git Viewer ribbon icon. The view opens in the right sidebar.
Use Changes to review and commit current working-tree changes. Use History to inspect recent local commits.
Click a file path to open it in Obsidian. Deleted files and files outside the current vault cannot be opened.
To commit:
- Select one or more visible status rows, or use Select all.
- Write a commit message.
- Click Commit selected.
The commit includes only the selected paths. Unselected staged files remain staged.
After a commit, Git Viewer shows a Last commit banner with a View in History shortcut. History remains read-only and uses local Git data only.
Development
npm install
npm run build
npm run lint
npx tsc --noEmit
npm test
For local development, copy or symlink this repository into .obsidian/plugins/git-viewer/ inside a Git-backed Obsidian test vault.
Release process
Obsidian installs community plugin files from GitHub releases. For each release:
- Update
manifest.json,package.json, andversions.jsonwhen the plugin version or minimum Obsidian version changes. - Run
npm install,npm run build,npm run lint,npx tsc --noEmit, andnpm test. - Create a GitHub release whose tag exactly matches
manifest.json.version. - Attach
main.js,manifest.json, andstyles.cssas release assets.
The repository includes a GitHub Actions release workflow with artifact attestation support. If GitHub Actions is disabled for the owner account, manual releases are still usable for Obsidian, but the Community automated review may show a recommendation about missing artifact attestations.
Community directory
Git Viewer is listed in the Obsidian Community directory.
Security and privacy
Git Viewer is a desktop plugin with Node.js filesystem access and permission to start the local git executable. It uses execFile with separate command arguments, an eight-second timeout and no shell interpreter. These permissions are broader than the Obsidian vault API; they are required for repository inspection and selected-file commits. The plugin does not itself make network requests or use clipboard APIs.
Repository discovery runs git rev-parse --show-toplevel from the vault directory. If the vault is nested inside a larger repository, Git status and history operate at that ancestor repository root and may include paths outside the vault. Only files that Obsidian can resolve inside the vault can be opened in its editor. Use the plugin only with local repositories and Git configuration you trust; Git commands can apply configured filters or other configured Git behavior.
History is read-only and uses local git log and git show --name-status. The explicit Commit selected action writes a new commit and advances the current branch; for an existing branch it checks the expected parent when updating the reference. The first commit in a repository has no existing parent to check. It creates a temporary index file in the operating system's temporary directory using GIT_INDEX_FILE, then removes that temporary file in finally. After advancing the branch it refreshes only the selected paths in the real Git index with git reset -q -- <paths>; unrelated staged entries remain untouched. This selected-path index refresh does not reset the branch or discard working files. The plugin offers no pull, push, clone, fetch, merge, rebase, discard or branch-management action.
License
Obsidian 1.15.1 assessment: checked source, local results and remaining host validation.