Blog

Grove 0.9.0: any commit, and worktrees that keep up

Grove 0.9.0 lets you click a commit to open it as a new worktree or check it out in place, gives worktrees nicknames and locks, follows worktrees and folders that change outside Grove, renames or re-locates a repository folder without losing its state, and makes removing a pinned site undoable.

Worktrees are the reason Grove exists: one repository, several checkouts, an agent working in each. But until now Grove assumed it was the only thing touching them. Agents run git worktree add on their own, folders get renamed or moved in Finder, a worktree gets deleted with rm -rf, and Grove either didn’t notice or noticed in the worst possible way. 0.9.0 is mostly about that. Grove now follows changes made elsewhere, lets you move and rename things from inside it without breaking anything, and adds a quick way to get from any commit in the history to a working checkout.

Go to any commit

The git panel’s Recent saves list was read-only. Now clicking a commit opens Go to Commit, which asks two things:

  • Where. Create Worktree (the default) makes a new checkout at that commit and switches the whole app to it: agent, shell, files, changes and git panel. The checkout you were in stays as it was. Check Out Here moves the checkout you’re in to that commit instead.
  • How. New branch, with a name already filled in (at- plus the short hash, and Grove tells you if that branch already exists), or Detached if you only want to look around.

If you pick Check Out Here with uncommitted changes, Grove asks first. Stash & Check Out stashes your changes, checks out, and puts them back. If they don’t apply cleanly, the stash is kept so nothing is lost. Check Out Anyway lets git try, and git will refuse if it would overwrite your files. Create Worktree Instead leaves your checkout alone entirely. Nothing is ever discarded. The sheet also reminds you that the agent and shell keep running through the switch, and how many of your pending review comments might go outdated.

Detached HEAD used to be a dead end in the git panel: the branch switcher was disabled and newer commits disappeared from the log. Now the commit you’re on is marked HEAD in Recent saves. While you’re detached, commits from the branch you left stay listed, and the branch switcher (reading “Not on a branch”) still works to get you back.

Worktrees with names and locks

Branch names make poor labels once you have four checkouts open side by side. A linked worktree’s Rename… now gives it a nickname that only Grove uses. It shows in the sidebar, the window title and the Files header, with the real branch name underneath and in the tooltip. Nothing on disk or in git changes.

Linked worktrees can also be locked from their right-click menu, with Lock… (and an optional reason) and Unlock. Grove already showed a lock icon, but it dropped the reason and let you confirm a Remove that git was always going to refuse. Now the reason shows in the tooltip, and Remove is disabled with a note telling you to unlock first.

Grove notices worktree changes made elsewhere

The Worktrees panel used to refresh only when you switched workspaces or used Grove’s own buttons. If an agent created a worktree from the Shell tab, you didn’t see it until you clicked away and back. Now the panel updates on its own when worktrees are added, removed, locked or unlocked outside Grove, without changing your selection. If Grove is in the background, it catches up when you come back. If the worktree you’re in gets removed, Grove switches back to the main checkout, and its agent and shells keep running.

A worktree whose folder was deleted by hand is now marked Folder not found with a warning icon, and clicking it does nothing. Before, it looked healthy, and selecting it pointed every tab at a folder that didn’t exist. Remove still works on it: it clears git’s record of the worktree and Grove’s saved state for it, and keeps the branch. One limitation: Grove doesn’t spot the deletion the moment it happens. The mark appears the next time the worktree list reloads.

Renaming and moving a repository folder

There are two new ways to change where a repository lives without starting over.

Rename the folder from Grove. Rename… on a workspace already set a Grove-only name. Rename… on the main checkout’s row in the Worktrees panel now renames the actual folder on disk. Since this touches your files, it takes three steps, and Cancel is the default on each one, so pressing Return never renames anything. Grove explains what’s about to happen, asks for the new name, then shows exactly what changes before doing it:

  • Agent and Shell tabs for that checkout close and reopen idle. If a shell is still running something, Grove won’t rename until it finishes.
  • Linked worktrees are repaired automatically so they keep working. Existing ones stay in their current folder. New ones go under the new name.
  • Saved prompts that use {{repo}} will get the new folder name.
  • Editors and terminals you have open outside Grove aren’t updated.

Pinned sites, notes, tab layouts, pending review comments, your agent choice and viewed marks all move with it. If something goes wrong partway through, Grove moves the folder back.

Locate a folder you moved yourself. If you moved or renamed a repository in Finder, the workspace used to show “Folder not found”, and the only way out was Remove from Workspaces, which threw away its name, pinned sites, notes, prompts and review comments. Now there’s Locate… on that screen and in the workspace’s right-click menu. Pick the folder’s new location and the workspace reloads with all of that intact. The folder has to be a git repository that isn’t already in Grove. Locate doesn’t change anything in your repository. If the repository has linked worktrees, git needs to repair their links after a move, and Grove tells you how to do that.

Pinned sites: close and undo

Pinned sites on the Home tab now have an ×, like the Agent and Shell tabs. A site pinned to just this checkout is removed right away. A site pinned to the whole workspace asks first, since it disappears from every worktree. Either way, a banner with Undo appears, and Edit › Undo Remove Site (⌘Z) works too. The site comes back in the same position.

A few smaller changes to the Home tab:

  • Favicons on the pinned-site tabs.
  • A Tab Titles setting in Settings → Spaces, to shorten long titles in the middle or at the end.
  • Separate sign-ins per workspace. Each workspace’s pinned sites now have their own cookies and sign-in state, so signing into an account in one repo doesn’t sign you in everywhere. Existing sign-ins were copied over on first use. Sites that keep your session in local storage, not cookies, will ask you to sign in once more. Clear Browsing Data… clears every workspace.

Smaller things

  • Grove shows up as “Grove” in Finder and the Dock.
  • The Agent tab no longer shows an × on its last tab, which did nothing anyway.
  • Under the hood, the code that talks to git has been reorganized so it’s easier to test on its own. You shouldn’t notice any difference.

Get it

Grove 0.9.0 is up at grove.molayab.com, or as a direct download for a fresh install. If you’re already running Grove, accept the update alert.

Most of this release is Grove giving up the idea that it’s in charge of your repository. You, your agents and Finder all change things, and Grove now keeps up with those changes instead of showing you a stale view until you click around to refresh it.

Share