Manage git worktrees using gwt for branch-based workflow. Use when switching branches, creating worktrees, listing worktrees, or cleaning up after merging PRs.
You have access to gwt, a Git worktree management tool that simplifies working with multiple branches simultaneously. Use gwt instead of raw git worktree commands for a streamlined workflow.
gwt sw <branch> # Switch to existing branch (creates worktree if needed)
gwt sw -b <branch> # Create new branch and switch to it
gwt sw -m # Switch to main/master branch
gwt sw <branch> --remote <remote> # Switch to branch from specific remote
gwt ls # List all worktrees (truncated branch names)
gwt ls --full # List with full branch names
gwt rm <branch> # Remove worktree for branch (prompts for confirmation)
gwt rm <branch> -y # Remove without confirmation
gwt rm <branch> -b # Remove worktree and delete the branch
gwt rm <branch> -B # Remove worktree and force-delete branch
gwt rm --this # Remove current worktree (switches to home first)
gwt home # Return to the main repository worktree
gwt current # Show current branch and worktree path (alias: gwt c)
gwt sw -b feature/name to create a new branch and worktreegwt sw other-branch to switch to another worktreegwt ls to see all available worktreesgwt home to return to main repositorygwt rm feature/name -b to remove worktree and delete merged branchgwt rm --this -b if still in the feature worktreeUse gwt current to see which branch and worktree you're in.
~/.gwt_store, keeping repos clean