Skip to main content
GWTree provides a comprehensive set of commands for managing git worktrees. All commands can be invoked using the gwt binary.

Quick Reference

Create

Create new git worktree(s)

List

List all worktrees for current repo

Remove

Remove worktrees interactively

Status

Show status of all worktrees

Clean

Remove merged worktrees

Merge

Merge worktree branch to main

Config

Manage configuration

Flags

Global flags and options

Command List

Core Commands

CommandAliasesDescription
gwt [names...]-Create new git worktree(s)
gwt listlsList worktrees for current repo
gwt removermRemove worktrees interactively
gwt statusstShow status of all worktrees (changes, commits ahead/behind)
gwt cleancRemove worktrees that have been merged to main
gwt merge <name>mMerge worktree branch to main and remove worktree
gwt config [action]-Open config file or reset defaults

Utility Commands

CommandDescription
gwt versionShow version number
gwt helpShow help information
gwt -v, --versionOutput the version number
gwt -h, --helpDisplay help for command

Global Flags

These flags work with the default gwt command (create):
FlagDescription
-y, --yesUse saved defaults, skip prompts
-x, --no-editorSkip opening editor after creation
For the clean command:
FlagDescription
-a, --allRemove all worktrees (not just merged)
See Flags for detailed information.

Getting Started

The most common workflow:
# Create a new worktree
gwt feature-name

# Check status of all worktrees
gwt status

# Merge and remove when done
gwt merge feature-name

# Or clean up merged worktrees
gwt clean

Version

Current version: 2.0.0