Worktrunk Bot
Worktrunk Bot
Thanks for the suggestion! I searched the codebase and confirmed this protection doesn't currently exist. There is an existing guard that prevents removing the **main worktree** (the original git directory...
Git distinguishes between the **main worktree** (the original directory from `git clone`/`git init`) and **linked worktrees** (created via `git worktree add`). For the **main worktree**, git refuses unconditionally — even...
Yes — `wt remove main` does an exact branch-name match against `git worktree list` output. In [`repository_ext.rs` L90-92](https://github.com/max-sixty/worktrunk/blob/9b77ab2d/src/commands/repository_ext.rs#L90-L92): ```rust worktrees .iter() .find(|wt| wt.branch.as_deref() == Some(branch)) ``` So `wt remove main`...
Yes — by default, `wt remove` attempts to delete the branch too. The behavior depends on flags: - **Default** (`wt remove main`): removes the worktree, then tries to delete the...
Good framing — the inconsistency is clear in the code. `wt list` explicitly skips the integration check for the default branch in [`item.rs` L594](https://github.com/max-sixty/worktrunk/blob/9b77ab2d/src/commands/list/model/item.rs#L594): ```rust if is_main || default_branch.is_none() {...
Thanks for reporting this! I was able to reproduce the issue and identified the root cause: when removing the current worktree, `spawn_hooks_after_remove` creates a new `Repository` at the primary worktree...
Thanks for the suggestion! I searched the codebase and didn't find an existing command for renaming a branch and its worktree folder together. The closest related functionality is [`wt step...
Here's a sketch of what `wt rename` could look like: ### Usage ```console # Rename branch + move worktree folder to match wt rename old-branch new-branch # Preview without changing...
Good point — `wt switch -c new-branch --base=old-branch` + `wt remove old-branch` covers the core use case with existing commands. The main difference is that a dedicated rename would be...
Here's a tested `rename` alias. Add to your user config (`~/.config/worktrunk/config.toml`): ```toml [aliases] rename = """ set -e # Commit any uncommitted changes on the base worktree wt step commit...