← 插件

Fresh Worktrees

Fast-forwards clean local base branches before Paseo creates branch-off worktrees

$ paseo plugin add omercnet/fresh-worktrees
报告问题
Fresh Worktrees 截图 1Fresh Worktrees 截图 2

该插件的概览尚未翻译为你的语言,因此以英文显示。

Fresh Worktrees updates the local base branch before Paseo creates a branch-off worktree, so new work starts from the latest remote code instead of a stale main.

Before the worktree is created, the plugin runs git fetch --prune against the repository's remote, then fast-forwards the local base branch with git merge --ff-only. It does this only when that branch is checked out in the source checkout and the checkout has no uncommitted changes. If the checkout is dirty, the fetch fails, or the update is not a fast-forward, it warns and the workspace is created from the existing local base. Explicit remote bases are fetched but no local branch is changed, and repositories without a remote are left alone.

It also shows Behind · N in the workspace header when a worktree is behind its source branch's remote. Paseo 0.12 does not render plugin header buttons in the compact workspace header (phones and narrow windows), so the indicator is not shown there. A sidebar footer lists behind workspaces and offers Refresh all, which fast-forwards each clean source checkout and skips dirty or diverged ones. It never modifies worktree branches.

Setup: git on the daemon host. The plugin runs git there with the daemon's environment and contacts the repository's remote on each fetch. Requires Paseo ^0.11.0 || ^0.12.0.