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