See what every AI agent is doing in every git worktree, live, in one desktop window.
When several AI agents (or you) work in parallel git worktrees, it is hard to know who changed what, who is behind, and who is about to collide. Git Worktree Monitor is a native desktop app (Avalonia) for Windows, Linux and macOS that watches all worktrees of your repositories and shows branches, diffs, sync state and overlapping changes. It only reads, and never writes to your repositories.
- Automatic discovery: add a repository once; every worktree is found, and additions and removals show up live
- At-a-glance status: branch, changed files, added and removed lines, commits ahead and behind, time of last activity
- Live diffs: "uncommitted" or "against the base branch", unified or side by side, with a filterable file list (tree or flat)
- Graph: the base branch is the axis and each worktree a lane showing where it forked and whether it is in sync, can fast-forward, needs a rebase or is behind
- Overlap warnings: a bar names the files that several worktrees change (same lines, same file, or not compared) and jumps to them; plus an activity timeline and notifications
- Read-only: runs no git command that writes to a repository
- Three UI languages and two themes: English, Simplified Chinese and Traditional Chinese; light, dark or follow the system
Git must be installed.
Download (no .NET needed) from GitHub Releases:
- macOS:
git-worktree-monitor-desktop-*-osx-arm64.dmg(Apple silicon) or-osx-x64.dmg(Intel). Open it and drag the app to Applications. The app is only ad-hoc signed, not notarized, so the first time use right-click → Open, or runxattr -dr com.apple.quarantine "/Applications/Git Worktree Monitor.app" - Windows and Linux:
git-worktree-monitor-desktop-*for win/linux, x64 and arm64; unpack it and run it
From source (needs the .NET 11 SDK):
git clone https://github.com/coldhighsun/GitWorktreeMonitor.git
cd GitWorktreeMonitor
dotnet run --project src/GitWorktreeMonitor.DesktopOptions (after -- with dotnet run): --data-dir <directory> for configuration and timelines (%LOCALAPPDATA%\GitWorktreeMonitor by default) and --no-update-check.
- Add a repository (or any of its worktrees) with Add repository, or drop its folder on the window.
- Pick a worktree in the list to see its changed files and diff. Graph shows the lanes along the base branch and Activity the timeline.
- The
⋯menu of a worktree copies its path and opens it in the file manager or a terminal; the branch chip at the top sets the base branch. - Settings holds the language, theme, monitoring options and notifications.
- Languages and theme are switched in Settings (the system language at first); both choices are remembered in
ui.jsonof the data directory - On Windows and macOS: a tray icon with a red dot while lines overlap, and closing the window keeps the program in the tray (switchable in Settings; Linux has no tray because many desktops lack a tray host). Only one copy can use a data directory
- Notifications use the system's own (macOS
osascript, Linuxnotify-send, Windows toast) when the window is in the background, and a message inside the window otherwise - On Linux, install
libnotify(notify-send) for system notifications and a font that covers Chinese
dotnet publish src/GitWorktreeMonitor.Desktop -c Release -r win-x64 --self-contained -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o publishThe target machine still needs git. On macOS, build/macos/package.sh osx-arm64 1.2.3 builds the app bundle and the .dmg (run it on a Mac). Versions come from git tags via MinVer. Pushing a tag such as v1.2.3 runs the CI workflow, which creates a GitHub release with the portable builds attached.
The tool runs no git command that writes to a repository: it sets GIT_OPTIONAL_LOCKS=0, turns off fsmonitor and
automatic index refresh, and diffs run no external programs. It therefore never competes with a working AI for index.lock.
- Changes are detected by watching files, with polling as a fallback (every 5 seconds by default; adjustable under Settings → Monitoring, 2 to 300 seconds)
- The timeline records only changes made while the app is running, and keeps the latest 2000 entries per repository
- The activity view can be narrowed to one worktree, to files, commits or branch and worktree changes, and to a text found in the path or worktree name (the choice of groups is remembered). Entries are grouped by day, and "Load earlier entries" fetches 300 more each time, up to the 2000 kept
- Two worktrees changing the same file are reported as overlapping. Where their changed lines can be compared (same fork point, text files, at most 50 overlapping files per repository), changes to different parts of the file are shown quietly with no notification, and only changes to the same or adjacent lines raise the "same lines" warning and notification. Otherwise the overlap is reported at file level, which does not mean they will conflict
- git does not record where a worktree was created from, so the graph is derived from the commit history of each branch, looking back at most 2000 commits
- A worktree is flagged as removable when its branch has been merged into the base branch (it has moved since it was created, has no commits of its own and no uncommitted changes, is not locked or recently active), or when its directory is gone. Squash and rebase merges are not detected. The app only offers the commands to copy and never runs them
- Each worktree can have a base branch of its own (the branch icon in its header), for worktrees branched off something other than the repository's base branch. Its ahead/behind numbers, "against the base branch" diff, overlap check and removal hint then use that branch; empty follows the repository again, and a branch that no longer exists falls back to the repository's with a red mark. The graph is still drawn against the repository's base branch and only labels such worktrees. Lines of two worktrees with different bases can rarely be compared, so their overlap stays "not compared"
- The remote gap (↑ ahead, ↓ behind an upstream) is read from the remote-tracking branches as they are; the app never runs
git fetch, so it is only as fresh as your last fetch. It shows for a worktree's own upstream, and for the base branch when that is a local branch (not when it isorigin/...) - Each worktree lists at most 2000 changed files (tracked changes first); lines are not counted for untracked files over 1 MB; a single file diff is truncated beyond about 500,000 characters
- When more than 20 files change in the same way during one refresh, the timeline records one summary; more than 5 new overlaps at once raise a single notification
- A bare repository with several worktrees is supported; the bare repository needs at least one worktree
- File events inside
node_modules,binandobjare ignored by default (polling still finds changes there that git does not ignore). Settings → Monitoring takes other directory names, one per line; only plain names are supported, not paths or patterns - Settings → Monitoring also sets how long a worktree counts as active (2 minutes by default). The checkbox in a repository's base-branch flyout mutes its notifications
- On Windows, a parent directory of a worktree may not be renameable while it is monitored
- The app cannot tell which AI or process made a change
Dependencies point one way: Desktop → Core → Git → Contracts.
| Project | Content |
|---|---|
GitWorktreeMonitor.Contracts |
Data types and IMonitorService, no dependencies |
GitWorktreeMonitor.Git |
Runs git and parses its output |
GitWorktreeMonitor.Core |
Watching, refreshing, timeline, alerts, position ruler, persistence |
GitWorktreeMonitor.Desktop |
Avalonia desktop app, uses Core in process |
User-facing text leaves the backend as a message code with arguments (UiText); the translations live in
src/GitWorktreeMonitor.Desktop/Resources/i18n/*.json.
dotnet test
