Warn when quitting if the vault's Git working tree has uncommitted changes.
A large, hard-to-miss warning when you quit Obsidian with uncommitted Git changes in your vault.

If your vault is a Git repository, this plugin checks the Git working tree when you close Obsidian.
The warning follows your active Obsidian theme.
It doesn't stop Obsidian from closing. It's a reminder, not a lock. If you see it, open the vault in a terminal and commit (or otherwise clean up) your changes.
Open the command palette (Ctrl+P / Cmd+P) and search for Dirty Tree Warning:
| Command | What it does |
|---|---|
| Preview warning | Shows the warning without closing Obsidian, so you can see how it looks. Press Esc to dismiss it. |
| Check working tree now | Shows a short notice saying whether the working tree is clean or has uncommitted changes. |
No hotkeys are set. You can assign your own in Settings → Hotkeys.
git on your system path.Files ignored by your .gitignore don't count as changes. If you don't want Obsidian's own settings folder to trigger the warning, add .obsidian/ to your .gitignore.
git executable (git status --porcelain) in your vault folder when you close Obsidian, and when you use Check working tree now..git folder) that lives outside the vault, for example when the vault is a subfolder of a larger repository.In Obsidian: Settings → Community plugins → Browse, search for Dirty Tree Warning, then select Install and Enable.
This plugin is provided as is. It works for its author, and it's shared in the hope that it's useful to others.
If it doesn't work for you, or you'd like it to behave differently, you're welcome to modify it under the terms of the license below.
Copyright (C) 2026 Top Tier Content
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version (GPL-3.0-or-later). See LICENSE.
If you distribute a modified version, keep the copyright notice above and credit Top Tier Content as the original author, as the license requires.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.