From 462575c880e127f00d3a5bbb79100f429efcf641 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 8 Mar 2026 13:25:44 +0100 Subject: [PATCH] Fix worktree removal --- default/bash/fns/worktrees | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/default/bash/fns/worktrees b/default/bash/fns/worktrees index 23203ab6..5fc1063a 100644 --- a/default/bash/fns/worktrees +++ b/default/bash/fns/worktrees @@ -29,7 +29,7 @@ gd() { # Protect against accidentally nuking a non-worktree directory if [[ "$root" != "$worktree" ]]; then cd "../$root" - git worktree remove "$worktree" --force + git worktree remove "$cwd" --force || return 1 git branch -D "$branch" fi fi