← Plugins

New workspace branch tools

Jorben1installs

Shows the project's current branch on the New workspace screen, and pulls, fetches or switches branches before you create a workspace

$ paseo plugin add jorben/paseo-branch-op
New workspace branch tools screenshot 1

Adds a Branch field to the New workspace screen. Once a project is selected, the field shows the branch checked out in the project's directory, with a small dot on its icon when the upstream has commits to pull. Its list shows the upstream branch, the commits behind and ahead, and whether the working tree has uncommitted changes.

The field is hidden when you choose a new worktree, since the worktree starts from the ref chosen in the Base picker.

Open the field to update the checkout before you create the workspace:

  • Pull runs git pull --ff-only in the project directory. It only fast-forwards, so it never creates a merge commit. A pull that cannot fast-forward, or that conflicts with local changes, fails and shows Git's message.
  • Fetch runs git fetch --prune and recounts the commits behind and ahead.
  • Pick another branch to switch the project directory to it with git switch. The list shows up to 20 local branches and up to 20 remote branches that have no local branch yet, newest commit first. Picking a remote branch creates a local branch that tracks it. Git refuses the switch when uncommitted changes would be overwritten, and the field shows Git's message; changes that do not conflict move to the new branch.

The field refreshes the status every 30 seconds while the screen is open.

Git runs on the daemon machine in the project's root directory, which the daemon resolves from the selected project. The plugin reads no other directories and sends nothing outside the daemon besides the Git traffic to your remotes. Git never prompts for credentials, so a remote that needs them must already be authenticated, for example through SSH keys or a credential helper.

Pulling and switching change the project directory itself. Local workspaces that use that directory, and agents running in them, see the new files at once.

Requires Paseo 0.19.1 or later and Git on the daemon's PATH.

Related plugins

Browse all plugins →