Skip to content

Releases: brzzdev/perch

v2.6.2

Choose a tag to compare

@github-actions github-actions released this 23 Sep 09:41
e1ec459

wt, br and bare perch now start fetching the remote as soon as they launch, while the picker is still open, and reuse that fetch once you pick. Before, you waited through the fetch (mostly SSH transport, about 1.7s) after picking. The background fetch can't prompt: if it fails, perch runs it again in the foreground so a passphrase or credential prompt can be answered.

A branch that exists on the remote but has never been fetched in this clone now works too. wt gives it a worktree at the remote's tip tracking origin/<branch> instead of creating it fresh off origin/main, and br no longer fails with pathspec did not match. An in-place switch now fast-forwards against the target branch's own remote rather than the remote of the branch you left, so a branch tracking upstream updates properly.

A worktree still does its own fetch when its result could differ from the early one: submodules, relative PATH/GIT_EXEC_PATH/core.hooksPath entries, GIT_DIR-style variables, or a remote that resolves differently in that worktree.

What's changed

Full changelog: v2.6.1...v2.6.2

v2.6.1

Choose a tag to compare

@github-actions github-actions released this 20 Sep 13:59
d612834

wt rm no longer leaves a removed worktree's files behind when the pane that ran it closes straight away. The background worker that deletes them now starts in its own session, so a pane manager that tears down every process in the pane's session cannot kill it. That was the common shape of the failure when a removed hook closes the worktree's own workspace right after wt rm . returns, which left a full checkout on disk with nothing retrying it until the next wt command in that repo.

What's changed

Full changelog: v2.6.0...v2.6.1

v2.6.0

Choose a tag to compare

@github-actions github-actions released this 07 Sep 16:08
f1d8e3b

What's changed

  • perch wt <name> <branch> now lets the worktree directory name differ from the branch name. This keeps directories short when branch names are long or namespaced.
  • --no-switch works with both the existing and new wt forms.

Existing perch wt <branch> behavior is unchanged.

Full changelog: v2.5.1...v2.6.0

v2.5.1

Choose a tag to compare

@github-actions github-actions released this 03 Sep 14:40
a9a8600

Stale cleanup now reports the Git evidence it has instead of claiming that a branch landed. A branch can be shown as tracks anchor, ahead or untracked, tip in anchor; deleted-upstream evidence is unchanged.

This keeps cleanup useful for squash merges and rebases without turning reachability into a stronger claim about how the work reached the anchor.

What's changed

Full changelog: v2.5.0...v2.5.1

v2.5.0

Choose a tag to compare

@github-actions github-actions released this 29 Aug 11:34
916068d

The navigation picker now draws two headings, Local and Remote. The Pinned section that hoisted the default branch and perch.keep entries above them is gone, and so are the inert absent rows it drew for kept branches that existed nowhere.

perch.keep keeps its one documented job: holding a branch back from the merged-branch cleanup sweep. The config key, its layering, the upstream-deletion guards and perch stale are all unchanged.

Note that br rm no longer greys out a kept branch or the default branch — only a branch some worktree holds stays disabled, so main can now be ticked in the picker. It was always removable by name; pinning bought a confirmation step rather than safety. Only the local ref goes: origin/main keeps the commits and the branch reappears under Remote, where checking it out recreates a local main tracking it. A plain git fetch won't bring it back, since fetch writes refs/remotes and never recreates a deleted refs/heads/main.

The reasoning is recorded in ADR 0011, which supersedes the relevant consequences of ADRs 0008 and 0009.

What's changed

Full changelog: v2.4.0...v2.5.0

v2.4.0

Choose a tag to compare

@github-actions github-actions released this 28 Aug 21:45
58c88c1

perch wt rm no longer makes you wait on the filesystem. Perch moves an eligible worktree to a hidden sibling on the same volume, confirms Git has dropped the registration, and hands the unlinking to a detached worker. Removing a large worktree returns as soon as the repository decisions are done, instead of after the roughly fifteen seconds it takes to unlink every file.

Reclamation records live in repository-local config, so a later wt command finishes work that was interrupted. Advisory locks keep a worker from reclaiming before deregistration and from traversing a tree another worker already holds. Unlicensed removals and initialized submodules stay behind Git's own guard; explicit --force licenses the fast path.

A named removal now resolves its target first and checks dirtiness only in that worktree, saving 0.10 to 0.46 seconds per unrelated worktree. A forced named removal skips the check entirely, since nothing reads its result. The interactive picker still assesses every worktree so its markers and risk legend stay complete.

Removal also shows a spinner for its full duration — the worktree name for a single selection, the count for a batch. Results and removed-hook output suspend the spinner so stderr stays readable and hook output keeps its order.

What's changed

Full changelog: v2.3.0...v2.4.0

v2.3.0

Choose a tag to compare

@github-actions github-actions released this 27 Aug 20:38
6a75f9e

Deletion now follows one staged safety pipeline across br rm, wt rm, and stale-branch cleanup. Perch assesses repository state and records the user's choice before it removes anything. Partial failures, hooks, output, and shell handoffs now follow the same rules in every path.

wt rm also validates its complete command line before any Git work begins. Unknown options, duplicate force flags, and extra targets fail immediately. Use -- to remove a worktree whose name begins with a dash:

perch wt rm -- -scratch

Help text and bash, zsh, and fish completions now share the parser's grammar, so completions no longer advertise command lines that Perch will reject. Normal removal commands keep their existing output and behavior.

What's changed

Full changelog: v2.2.0...v2.3.0

v2.2.0

Choose a tag to compare

@github-actions github-actions released this 27 Aug 13:22
c27e775

perch br rm removes local branches without dropping down to raw Git commands:

perch br rm
perch br rm feature
perch br rm feature --upstream

The interactive picker keeps the current branch, linked-worktree branches, the remote default branch, and branches named by perch.keep out of harm's way. Named unmerged branches require confirmation before Perch forces their removal.

--upstream can also remove the branch's explicitly configured, same-named upstream. Perch confirms that separately, refuses remote default branches, and uses a lease so it will not delete a remote branch that changed after inspection.

A branch literally named rm remains accessible with perch br -- rm.

What's changed

Full changelog: v2.1.0...v2.2.0

v2.1.0

Choose a tag to compare

@github-actions github-actions released this 26 Aug 12:55
ba21232

perch wt can now create or find a worktree without moving the calling shell:

perch wt --no-switch feature
perch wt feature --no-switch

The flag also works with the interactive picker. Fetching, worktree updates, hooks, and stale-branch cleanup still run; only the shell Handoff is suppressed. Help and bash, zsh, and fish completions include the new option.

What's changed

Full changelog: v2.0.0...v2.1.0

v2.0.0 — perch

Choose a tag to compare

@github-actions github-actions released this 23 Aug 14:30
0d4378e

git-switch is now perch. The binary, the config directory, the completions and the shell integration all change name, and the command surface is three verbs instead of one.

Command Meaning
perch <branch> Take me to it, wherever it lives. Creates nothing.
perch br <branch> Check it out in place, in this worktree.
perch wt <branch> Ensure it has its own worktree.

br and wt also install as standalone shortcuts, and completions work under all three names.

Upgrading from v1

  • Install the new binary as perch and remove the old git-switch one.
  • Re-run the shell integration and completion install steps — the files moved to ~/.config/perch/ and _perch.
  • Anything scripted against git-switch needs renaming; there is no compatibility shim.

See the README for the full install steps.

What's Changed

  • refactor: rename git-switch to perch by @brzzdev in #90
  • feat(cli): three-verb command surface (perch / br / wt) by @brzzdev in #91
  • feat(picker): draw one list for all three verbs by @brzzdev in #92
  • feat(shell): br and wt shortcuts, completions for all three names by @brzzdev in #93
  • refactor(completions): let the binary answer what wt rm accepts by @brzzdev in #95
  • refactor(completions): let the binary answer which branches complete by @brzzdev in #97
  • chore(deps): refresh the lockfile and keep it fresh by @brzzdev in #98
  • chore: bump version to 2.0.0 by @brzzdev in #99

Full Changelog: v1.0.13...v2.0.0