Releases: shhac/git-wt
v0.6.1
v0.6.0
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.zigdetects wrapper vs bare mode once at startup based onGWT_FDpresence, passed through all commands isStderrTty/isWriterTtyhelpers — 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-colorrespected 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 ofexit(130)to bypass atexit handlers newcommand respects--no-color— addedno_colorparameter tonewcommand (previously onlygoandlistsupported it)
Changed
process.changeCurDir()removed — all 5 call sites (4 ingo, 1 innew) removed; these were no-ops in bare mode and misleading in wrapper mode- Help text updated —
go,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 writer —
selectFromList/selectMultipleFromList/selectFromListUnifiednow take an explicit writer parameter, enabling future stderr rendering
Performance
- fd/TTY checks cached —
isStdinTty(),isStdoutTty(), andfd.isEnabled()results cached at function entry ingocommand instead of repeated syscalls (was 4-9 calls per invocation) - Duplicate computation eliminated —
will_use_interactive/use_interactivecollapsed to single computation; deadui_writerbranch simplified
v0.5.1
Added
- Configurable fd number —
git-wt alias gwt --fd 5generates a shell function using fd 5 instead of the default fd 3; useful when fd3 is already in use by another tool GWT_FDenv var — replacesGWT_USE_FD3; carries both "enabled" and "which fd" in one value (e.g.,GWT_FD=3)
Fixed
gwt newauto-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_FD3removed — replaced byGWT_FD=N; re-eval your alias to update:eval "$(git-wt alias gwt)"
v0.5.0
Changed
--helpand--versionnow output to stdout — previously went to stderr, breakinggit-wt --help | lessand similar pipelines- Unknown flags now produce an error — previously silently ignored; typos like
--josnare 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 —
$flagsstring replaced with"${flags[@]}"array; fixes--parent-dirwith paths containing spaces - Shell alias uses POSIX-compatible syntax — replaced
[[ ]]bashisms with[ ]andcasefor broader shell compatibility
Fixed
- Critical:
gofast-path fd3 bug — thefindWorktreeByBranchoptimization unconditionally wrotecdto 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 --helphad wrong alias syntax — saidgit-wt --alias gwtinstead ofgit-wt alias gwtgowithout 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/-jdocumented inlist --help— was a supported but undiscoverable featureNO_COLORsupport incleancommand — respects the standardNO_COLORenvironment variable- Configuration paths shown in
--help—~/.config/git-wt/configand.git-wt.tomlnow mentioned in help output - Removed unused dependencies —
clapandansi_termremoved frombuild.zig.zon(neither was imported) - Updated CI — migrated to
mlugg/setup-zig, Zig 0.15.2,action-gh-releasev2
Developer Notes
- Fixed
build.zig.zonmetadata: version now matches release, minimum_zig_version set to 0.15.1 - Updated
docs/INSTALLATION.mdto require Zig 0.15.1+
v0.4.4
Fixed
- Critical:
cleancommand — 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
cdcommands brokegwt gofor worktree paths containing spaces -nflag conflict — global--non-interactiveintercepted-nbeforecleancould use it for--dry-run; changed dry-run shortcut to-dfindWorktreeByBranch— optimization path never matched becauserefs/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
# commenttext; now stripped correctly - Memory leak —
listWorktreesmissing errdefer for partial allocation cleanup on error - Missing
cleanin help —printUsage()now includes thecleancommand - Dead code cleanup — removed unused
withLockfunction (had latent compile error), duplicate validation check
v0.4.3
Added
- Skill Validator - New
git-wt-skill-validatorskill 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
clapdependency hash inbuild.zig.zonfor 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
.gitignorerules for.claude/directory with exceptions for skills/agents/commands
Release v0.4.1 - Bug Fix Release
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
- Before:
-
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 +✓checkmarkprintError()→ 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-wtLinux (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-wtLinux (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-wtPlatform 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
New Features
-
clean command - Remove all worktrees for deleted branches
- Lists worktrees before removal for review
--dry-runflag to preview changes without removing--forceflag to skip confirmation prompt
-
JSON output format - Machine-readable output for scripting
--json(or-j) flag forlistcommand- Structured output with branch, path, display_name, is_current, and last_modified fields
Code Quality Improvements
- Refactored
selectFromListUnifiedfunction (27% size reduction: 291 → 212 lines) - Extracted
renderInstructionshelper to eliminate code duplication - Consolidated lock acquisition error handling with
acquireWithUserFeedbackhelper - Removed code smells: replaced
catch unreachablewithtry - Removed unused
execWithErrorfunction
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-wtmacOS (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-wtmacOS (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-wtLinux (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-wtLinux (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-wtPlatform 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
🐛 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
🎨 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.