Problem
gtr clean --merged fails silently when worktrees contain submodules, because the underlying git worktree remove refuses to remove worktrees with submodules:
==> Removing worktree: my-feature
[x] Failed to remove worktree: fatal: working trees containing submodules cannot be moved or removed
This affects any repo that uses git submodules — all worktrees will fail to clean up, making gtr clean --merged essentially unusable in those repos.
Current behaviour
gtr rm already supports --force to bypass this (and the uncommitted-changes check). However, gtr clean has no equivalent flag, so there's no way to clean up merged worktrees in repos with submodules without resorting to manual rm -rf + git worktree prune.
Requested change
Add a --force flag to gtr clean that passes through to the underlying git worktree remove --force call, consistent with how gtr rm --force works.
gtr clean --merged --yes --force
Workaround
Currently the only option is manually removing each worktree directory and running git worktree prune, which loses the merge-detection and other benefits of gtr clean.
Problem
gtr clean --mergedfails silently when worktrees contain submodules, because the underlyinggit worktree removerefuses to remove worktrees with submodules:This affects any repo that uses git submodules — all worktrees will fail to clean up, making
gtr clean --mergedessentially unusable in those repos.Current behaviour
gtr rmalready supports--forceto bypass this (and the uncommitted-changes check). However,gtr cleanhas no equivalent flag, so there's no way to clean up merged worktrees in repos with submodules without resorting to manualrm -rf+git worktree prune.Requested change
Add a
--forceflag togtr cleanthat passes through to the underlyinggit worktree remove --forcecall, consistent with howgtr rm --forceworks.Workaround
Currently the only option is manually removing each worktree directory and running
git worktree prune, which loses the merge-detection and other benefits ofgtr clean.