Skip to content

Releases: shhac/git-wt

v0.6.1

27 Feb 17:21
ad6b515

Choose a tag to compare

Fixed

  • Namespaced branch display names — branches with slashes (e.g., aaaa/foo and bbbb/foo) previously both displayed as foo in list, go, and rm pickers; now shows the path relative to the trees dir (aaaa/foo, bbbb/foo)

v0.6.0

27 Feb 15:34
8d507bc

Choose a tag to compare

Added

  • Bare mode (dual-mode support) — when running as git wt (without the shell alias), the tool now outputs worktree paths instead of attempting to change directories. At a TTY, shows a copy-paste hint (→ cd '/path'); when piped, outputs the raw path for scripting (cd "$(git-wt go branch)")
  • Mode detection module — new mode.zig detects wrapper vs bare mode once at startup based on GWT_FD presence, passed through all commands
  • isStderrTty / isWriterTty helpers — interactive module can now check TTY status of any output writer
  • Bare-mode documentation — SHELL-INTEGRATION.md and USAGE.md now document the scripting pattern and bare-mode behavior

Fixed

  • --no-color respected in bare-mode hints — the → cd '/path' hint lines previously had hardcoded ANSI color codes that ignored --no-color; now properly gated
  • UTF-8 arrow fallback — the character in bare-mode hints now falls back to -> on non-UTF-8 terminals (matches existing /[OK] pattern)
  • Signal handler async-signal-safety — replaced mutex with atomic operations to prevent potential deadlock when SIGINT arrives during terminal state changes; uses _exit(130) instead of exit(130) to bypass atexit handlers
  • new command respects --no-color — added no_color parameter to new command (previously only go and list supported it)

Changed

  • process.changeCurDir() removed — all 5 call sites (4 in go, 1 in new) removed; these were no-ops in bare mode and misleading in wrapper mode
  • Help text updatedgo, new, and top-level help now accurately describe both wrapper and bare mode behavior instead of claiming to "change the current working directory"
  • Interactive picker accepts output writerselectFromList / selectMultipleFromList / selectFromListUnified now take an explicit writer parameter, enabling future stderr rendering

Performance

  • fd/TTY checks cachedisStdinTty(), isStdoutTty(), and fd.isEnabled() results cached at function entry in go command instead of repeated syscalls (was 4-9 calls per invocation)
  • Duplicate computation eliminatedwill_use_interactive / use_interactive collapsed to single computation; dead ui_writer branch simplified

v0.5.1

21 Feb 19:41
c7087d5

Choose a tag to compare

Added

  • Configurable fd numbergit-wt alias gwt --fd 5 generates a shell function using fd 5 instead of the default fd 3; useful when fd3 is already in use by another tool
  • GWT_FD env var — replaces GWT_USE_FD3; carries both "enabled" and "which fd" in one value (e.g., GWT_FD=3)

Fixed

  • gwt new auto-navigation — creating a worktree via the shell alias now navigates directly instead of showing the interactive picker (arg parser was consuming the branch name as the value of --show-command)

Changed

  • GWT_USE_FD3 removed — replaced by GWT_FD=N; re-eval your alias to update: eval "$(git-wt alias gwt)"

v0.5.0

21 Feb 17:07
e0ab730

Choose a tag to compare

Changed

  • --help and --version now output to stdout — previously went to stderr, breaking git-wt --help | less and similar pipelines
  • Unknown flags now produce an error — previously silently ignored; typos like --josn are now caught with a helpful message
  • Multi-select (rm) requires explicit selection — pressing Enter without Space-toggling no longer auto-selects the highlighted item; prevents accidental deletion
  • Shell alias uses bash arrays for flags$flags string replaced with "${flags[@]}" array; fixes --parent-dir with paths containing spaces
  • Shell alias uses POSIX-compatible syntax — replaced [[ ]] bashisms with [ ] and case for broader shell compatibility

Fixed

  • Critical: go fast-path fd3 bug — the findWorktreeByBranch optimization unconditionally wrote cd to stdout when fd3 was disabled; user saw raw text instead of navigating
  • Shell cd paths now single-quoted — prevents shell expansion of $, backticks, and other metacharacters in worktree paths
  • go --help had wrong alias syntax — said git-wt --alias gwt instead of git-wt alias gwt
  • go without shell alias now shows setup hint — instead of silently changing only the subprocess directory, prints a tip about setting up the shell alias

Added

  • Unknown flag validation — all commands now validate flags and error on unrecognized ones
  • --json/-j documented in list --help — was a supported but undiscoverable feature
  • NO_COLOR support in clean command — respects the standard NO_COLOR environment variable
  • Configuration paths shown in --help~/.config/git-wt/config and .git-wt.toml now mentioned in help output
  • Removed unused dependenciesclap and ansi_term removed from build.zig.zon (neither was imported)
  • Updated CI — migrated to mlugg/setup-zig, Zig 0.15.2, action-gh-release v2

Developer Notes

  • Fixed build.zig.zon metadata: version now matches release, minimum_zig_version set to 0.15.1
  • Updated docs/INSTALLATION.md to require Zig 0.15.1+

v0.4.4

21 Feb 15:53
b060f75

Choose a tag to compare

Fixed

  • Critical: clean command — worktree removal was broken due to double "git" prefix in subprocess args (always failed silently)
  • Critical: Signal termination — accessing process exit code without checking termination type caused undefined behavior when git was killed by signal (SIGKILL, SIGPIPE)
  • Critical: Shell navigation — unquoted paths in fd3 cd commands broke gwt go for worktree paths containing spaces
  • -n flag conflict — global --non-interactive intercepted -n before clean could use it for --dry-run; changed dry-run shortcut to -d
  • findWorktreeByBranch — optimization path never matched because refs/heads/ prefix wasn't stripped; function now works as intended
  • Timestamp underflow — future-dated file timestamps (clock skew, NFS) caused panic; now clamped to 0 across 8 locations
  • Config boolean override — project config couldn't override user config booleans back to false; config booleans now use three-state (?bool)
  • TOML inline comments — unquoted config values included trailing # comment text; now stripped correctly
  • Memory leaklistWorktrees missing errdefer for partial allocation cleanup on error
  • Missing clean in helpprintUsage() now includes the clean command
  • Dead code cleanup — removed unused withLock function (had latent compile error), duplicate validation check

v0.4.3

01 Nov 00:27
05259c4

Choose a tag to compare

Added

  • Skill Validator - New git-wt-skill-validator skill for maintaining documentation accuracy
    • Validates that project skills match current codebase state
    • Detects drift in architecture, test counts, command lists, and workflows
    • Supports quick validation, deep validation, and auto-update modes
    • Ensures documentation stays synchronized after refactoring

Fixed

  • CI/CD Dependency Hash - Updated clap dependency hash in build.zig.zon for version 0.11.0
    • Fixes GitHub Actions build failures caused by outdated package hash
    • All CI workflows now passing on Ubuntu and macOS

Developer Notes

  • Extracted detailed documentation from CLAUDE.md into specialized skills
  • Skills now provide progressive disclosure of information
  • Added .gitignore rules for .claude/ directory with exceptions for skills/agents/commands

Release v0.4.1 - Bug Fix Release

31 Oct 21:30
2a94973

Choose a tag to compare

Bug Fixes

This release fixes duplicate symbols in command output that were causing visual issues.

Fixed Issues

  • Duplicate checkmarks in clean command

    • Before: ✓ ✓ No worktrees need cleaning
    • After: ✓ No worktrees need cleaning
  • Duplicate symbols in remove command (5 instances)

    • ✓ Worktree removed successfully
    • ✓ Branch deleted successfully
    • ✓ Removed worktree for 'branch'
    • ✓ Successfully removed: X worktrees
    • ✗ Failed to remove: X worktrees
  • Duplicate 'Error:' prefix in new command

    • printError() already adds "Error:" prefix automatically

Root Cause

Helper functions printSuccess() and printError() automatically add symbols and prefixes:

  • printSuccess() → adds bold+green + checkmark
  • printError() → adds bold+red + Error: text

We were manually duplicating these in format strings throughout the codebase.

Technical Details

  • All 62 tests passing
  • Zero memory leaks
  • No functional changes, only output formatting fixes

Installation

macOS (Universal - Intel & Apple Silicon)

curl -LO https://github.com/shhac/git-wt/releases/download/v0.4.1/git-wt-macos-universal.tar.gz
tar -xzf git-wt-macos-universal.tar.gz
chmod +x git-wt-macos-universal
mv git-wt-macos-universal ~/.local/bin/git-wt

Linux (x86_64)

curl -LO https://github.com/shhac/git-wt/releases/download/v0.4.1/git-wt-x86_64-linux.tar.gz
tar -xzf git-wt-x86_64-linux.tar.gz
chmod +x git-wt-x86_64-linux
sudo mv git-wt-x86_64-linux /usr/local/bin/git-wt

Linux (ARM64)

curl -LO https://github.com/shhac/git-wt/releases/download/v0.4.1/git-wt-aarch64-linux.tar.gz
tar -xzf git-wt-aarch64-linux.tar.gz
chmod +x git-wt-aarch64-linux
sudo mv git-wt-aarch64-linux /usr/local/bin/git-wt

Platform Support

Platform Architecture Binary Size
macOS Universal (Intel + Apple Silicon) 500 KB
macOS Intel (x86_64) 262 KB
macOS Apple Silicon (ARM64) 238 KB
Linux x86_64 1.1 MB
Linux ARM64 1.1 MB

Release v0.4.0 - New Features & Code Quality

31 Oct 20:47
b1fecda

Choose a tag to compare

New Features

  • clean command - Remove all worktrees for deleted branches

    • Lists worktrees before removal for review
    • --dry-run flag to preview changes without removing
    • --force flag to skip confirmation prompt
  • JSON output format - Machine-readable output for scripting

    • --json (or -j) flag for list command
    • Structured output with branch, path, display_name, is_current, and last_modified fields

Code Quality Improvements

  • Refactored selectFromListUnified function (27% size reduction: 291 → 212 lines)
  • Extracted renderInstructions helper to eliminate code duplication
  • Consolidated lock acquisition error handling with acquireWithUserFeedback helper
  • Removed code smells: replaced catch unreachable with try
  • Removed unused execWithError function

Technical Details

  • All 62 tests passing
  • Zero memory leaks detected
  • Improved maintainability and code organization

Installation

macOS (Universal - Intel & Apple Silicon)

curl -LO https://github.com/shhac/git-wt/releases/download/v0.4.0/git-wt-macos-universal.tar.gz
tar -xzf git-wt-macos-universal.tar.gz
chmod +x git-wt-macos-universal
mv git-wt-macos-universal ~/.local/bin/git-wt

macOS (Intel only)

curl -LO https://github.com/shhac/git-wt/releases/download/v0.4.0/git-wt-x86_64-macos.tar.gz
tar -xzf git-wt-x86_64-macos.tar.gz
chmod +x git-wt-x86_64-macos
mv git-wt-x86_64-macos ~/.local/bin/git-wt

macOS (Apple Silicon only)

curl -LO https://github.com/shhac/git-wt/releases/download/v0.4.0/git-wt-aarch64-macos.tar.gz
tar -xzf git-wt-aarch64-macos.tar.gz
chmod +x git-wt-aarch64-macos
mv git-wt-aarch64-macos ~/.local/bin/git-wt

Linux (x86_64)

curl -LO https://github.com/shhac/git-wt/releases/download/v0.4.0/git-wt-x86_64-linux.tar.gz
tar -xzf git-wt-x86_64-linux.tar.gz
chmod +x git-wt-x86_64-linux
sudo mv git-wt-x86_64-linux /usr/local/bin/git-wt

Linux (ARM64)

curl -LO https://github.com/shhac/git-wt/releases/download/v0.4.0/git-wt-aarch64-linux.tar.gz
tar -xzf git-wt-aarch64-linux.tar.gz
chmod +x git-wt-aarch64-linux
sudo mv git-wt-aarch64-linux /usr/local/bin/git-wt

Platform Support

Platform Architecture Binary Size Status
macOS Universal (Intel + Apple Silicon) 500 KB ✅ Tested
macOS Intel (x86_64) 261 KB ✅ Tested
macOS Apple Silicon (ARM64) 238 KB ✅ Tested
Linux x86_64 1.1 MB ✅ Built
Linux ARM64 1.1 MB ✅ Built

v0.3.1 - Display Name Bug Fix

31 Oct 19:44
8b30bad

Choose a tag to compare

🐛 Bug Fix Release

This patch release fixes a critical bug where worktree display names were incorrectly shown in the interactive navigation menu.

🔧 Fixed

  • Incorrect display names in command
    • Previously used flawed "-trees" path heuristic to identify main repository
    • Worktrees outside standard "-trees" directories showed wrong names
    • Now properly compares paths with repository root for accurate identification

🎯 Impact

This fix ensures that:

  • All worktrees show correct directory names in interactive selection
  • Main repository is properly identified regardless of directory structure
  • Custom worktree locations are handled correctly

📦 Installation

# macOS (universal binary)
curl -L https://github.com/shhac/git-wt/releases/download/v0.3.1/git-wt-macos-universal.tar.gz | tar xz
sudo mv git-wt-macos-universal /usr/local/bin/git-wt

# Linux x86_64
curl -L https://github.com/shhac/git-wt/releases/download/v0.3.1/git-wt-x86_64-linux.tar.gz | tar xz
sudo mv git-wt-x86_64-linux /usr/local/bin/git-wt

🙏 Acknowledgements

All 62 unit tests passing. Tested with various worktree configurations.

v0.3.0 - Interactive UI Rendering Improvements

31 Oct 18:28
705e58f

Choose a tag to compare

🎨 Interactive UI Rendering Improvements

This release focuses on significantly improving the interactive menu rendering experience, fixing several visual bugs and adding better terminal compatibility.

🐛 Rendering Fixes

  • Fixed ghost menu items appearing after selection
  • Fixed output flicker and progressive rendering issues
  • Fixed instruction line redrawing during navigation
  • Improved window resize handling to preserve context

✨ Terminal Compatibility

  • Added centralized terminal capability detection
  • UTF-8 detection with automatic ASCII fallbacks:
    • Arrow keys: "↑/↓" → "Up/Down"
    • Checkmarks: "✓" → "[OK]"
  • Support for NO_COLOR environment variable

🔧 Code Quality

  • Replaced inline ANSI codes with named constants
  • Simplified complex ANSI nesting for maintainability
  • Improved git module error handling
  • Added comprehensive rendering test suite

📦 Installation

# macOS (universal binary)
curl -L https://github.com/shhac/git-wt/releases/download/v0.3.0/git-wt-macos-universal.tar.gz | tar xz
sudo mv git-wt-macos-universal /usr/local/bin/git-wt

# Linux x86_64
curl -L https://github.com/shhac/git-wt/releases/download/v0.3.0/git-wt-x86_64-linux.tar.gz | tar xz
sudo mv git-wt-x86_64-linux /usr/local/bin/git-wt

🙏 Acknowledgements

All 62 unit tests and interactive tests passing. Tested on macOS and Linux.