Tag: workflow-optimization

Blog Posts

I Made a Lightweight Git Worktree Manager (Because I Couldn't Find One)

I built a git worktree manager because I couldn't find a simple one.

The problem hit me running two AI coding agents at once. One was refactoring accessibility code while I read the current implementation to chase a bug. Same files, different contexts. Committing the half-done work wasn't an option, stashing would have wiped the agent's state, and I had no clean checkout to review against.

Git worktrees solved that, but the syntax was awkward. Branchyard is great if you want VS Code integration and git hooks. I wanted something I could drop in my dotfiles and read end to end in 20 minutes.

So I built gwt (git-worktree-utils): • bash, zero dependencies • Source-based, lives in ~/.config • One branch = one directory (keeps the mental model simple) • Built-in cleanup for orphaned directories

Use cases beyond AI agents: • Code review without losing your place • Emergency hotfixes without stashing • Running tests in one branch while coding in another

Multiple branches in separate directories, and switching costs a cd instead of a stash. Nothing to unwind, the IDE stays put, and the two contexts never touch.

Project: https://github.com/jamesfishwick/git-worktree-utils