Skip to content

brycircle/gh-wt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gh-wt

🔹Report Bug     🔹Request Feature

Fast and Ligtweight CoW-backed git worktree sessions . Linux uses OverlayFS, macOS uses APFS clonefile(2).

disk used (GiB) — k same-tree worktrees of the Linux kernel (1.77 GiB, 93k files)

18 |                                      ●                    git worktree add  (O(N))
   |                                   ●
15 |                                 /
   |                              /
12 |                           /
   |                        /
 9 |                    ●
   |                  /
 6 |               /
   |            /
 3 |         ●
   |    ●           ·           ·          ·          ·          ●  gh wt add    (≈const)
 0 ●─────●─────────●─────────────────────●─────────●─────────●
   0     1   2     5            10            15           20    k (# worktrees)

At k = 10 worktrees gh-wt uses ~8× less disk; at k = 20, ~13×. Full methodology and raw data: docs/benchmark.md.

Installation

gh extension install HikaruEgashira/gh-wt

Usage

$ gh wt --help
Usage:
  gh wt list                ... List worktrees
  gh wt add <branch> [path] ... Add a worktree
  gh wt remove              ... Remove a worktree (interactive)
  gh wt gc                  ... Delete unreferenced cache entries
  gh wt *your_command*      ... Search via fzf and run the command

Examples

# Create a worktree for a branch
gh wt add feature-branch

# Remove a worktree (interactive)
gh wt remove

# Open a worktree in VS Code
gh wt code

# Run a command inside a selected worktree
gh wt -- claude

Requirements

Related

  • gh-q - ghq-like repository management for GitHub CLI

About

Explenable, Easy to use, Git worktree management :octocat:

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Shell 75.1%
  • Swift 22.8%
  • Awk 1.1%
  • Makefile 1.0%