An open API service indexing awesome lists of open source software.

https://github.com/dazz/git-wt

Git Worktree Manager: A simplified interface for managing Git worktrees with the `wt` executable.
https://github.com/dazz/git-wt

Last synced: 11 months ago
JSON representation

Git Worktree Manager: A simplified interface for managing Git worktrees with the `wt` executable.

Awesome Lists containing this project

README

          

# Git Worktree Manager

A simplified interface for managing Git worktrees with the `wt` executable.

`wt` is a Bash script that provides a user-friendly wrapper around Git's worktree functionality. It simplifies the process of creating, managing, and switching between multiple working directories from a single Git repository, enabling true parallel development workflows.

To understand what git worktree is, simply run `git worktree --help` on your commandline and read the nice manual.

## Installation

Copy the `wt` executable to a directory in your `$PATH`:

```bash
# Copy to user bin directory
cp wt ~/.local/bin/

# Or copy to system bin directory (requires sudo)
sudo cp wt /usr/local/bin/

# Make executable if needed
chmod +x ~/.local/bin/wt
```

## Quick Start

```bash
# List current worktrees
wt list

# Create new worktree for feature development
wt create feature-auth

# Switch to existing worktree
wt switch feature-auth

# Remove completed worktree
wt remove feature-auth
```

## Claude Code Integration

Use the `/wt` slash command in Claude Code for intelligent worktree management:

```
/wt create feature-oauth --base main
/wt list
/wt cleanup
```

The slash command provides comprehensive guidance on parallel development workflows, naming conventions, and best practices. See [.claude/commands/wt.md](.claude/commands/wt.md) for detailed documentation.

## Key Features

- **Parallel Development**: Multiple Claude Code sessions on different features
- **Smart Defaults**: Worktrees created in `.worktrees/` directory
- **Sparse Checkout**: Work with specific directories only
- **Automatic Cleanup**: Remove stale worktrees and references

## Commands

- `wt create ` - Create new worktree
- `wt switch ` - Switch to worktree
- `wt remove ` - Remove worktree
- `wt list` - Show all worktrees
- `wt cleanup` - Clean up stale references