Fix worktree removal

This commit is contained in:
David Heinemeier Hansson
2026-03-08 13:25:46 +01:00
parent 631bdec159
commit 462575c880
+1 -1
View File
@@ -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