Repairing Worktrees
If Tower detects an invalid Worktree, selecting the Worktree item in the “Worktrees” section of the sidebar will display a special detail view with options to either delete or attempt to repair the Worktree.
Common Causes of Broken Worktrees
- Moved Destination: Most often, the issue arises when the Worktree directory has been moved to a new location without updating its references in the Git configuration using the
git worktree
command or Tower.
How to Repair a Worktree
- Select the Worktree: Click the broken Worktree item in the sidebar. Tower will automatically display a detail view with repair options.
- Choose to Repair: Select option from the detail view.
- Select the New Destination: If the Worktree has been moved, Tower will display a dialog prompting you to select the new destination directory for the Worktree.
- Repair References: Tower will update all relevant Git references to point to the selected destination, restoring the Worktree to a functional state.
Delete as an Alternative
If the Worktree cannot be repaired or is no longer needed, you can choose the
option to remove the broken Worktree from the repository.