From 3d535a593c1d18540370d31e6d5d2be54dbd722f Mon Sep 17 00:00:00 2001 From: JacobPEvans <20714140+JacobPEvans@users.noreply.github.com> Date: Wed, 25 Feb 2026 07:27:41 -0500 Subject: [PATCH 1/2] fix(git-guards): auto-allow git worktree remove Removes worktree remove from ASK_GIT so it's silently allowed. This is a routine low-risk operation in the worktree workflow. (claude) --- git-guards/scripts/git-permission-guard.py | 1 - 1 file changed, 1 deletion(-) diff --git a/git-guards/scripts/git-permission-guard.py b/git-guards/scripts/git-permission-guard.py index 5d326ac..f4dcb6b 100755 --- a/git-guards/scripts/git-permission-guard.py +++ b/git-guards/scripts/git-permission-guard.py @@ -35,7 +35,6 @@ ("push --force-with-lease", "Overwrites remote history"), ("push --force", "Overwrites remote history"), ("push -f", "Overwrites remote history"), - ("worktree remove", "Removes worktree directory"), ("cherry-pick", "Rewrites commit history"), ("merge", "Can create merge commits or conflicts"), ("reset", "Can lose uncommitted work permanently"), From 0531f3015de44debbbbd50610428b8ef885d7aff Mon Sep 17 00:00:00 2001 From: JacobPEvans <20714140+JacobPEvans@users.noreply.github.com> Date: Wed, 25 Feb 2026 07:35:34 -0500 Subject: [PATCH 2/2] fix(git-guards): guard worktree remove --force, allow plain remove Plain `git worktree remove` is safe (fails if uncommitted changes exist), so it no longer needs confirmation. The forced variants (`-f`/`--force`) can discard uncommitted changes and now prompt for confirmation. (claude) --- git-guards/scripts/git-permission-guard.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git-guards/scripts/git-permission-guard.py b/git-guards/scripts/git-permission-guard.py index f4dcb6b..aea1488 100755 --- a/git-guards/scripts/git-permission-guard.py +++ b/git-guards/scripts/git-permission-guard.py @@ -35,6 +35,8 @@ ("push --force-with-lease", "Overwrites remote history"), ("push --force", "Overwrites remote history"), ("push -f", "Overwrites remote history"), + ("worktree remove --force", "Removes worktree directory, discarding uncommitted changes"), + ("worktree remove -f", "Removes worktree directory, discarding uncommitted changes"), ("cherry-pick", "Rewrites commit history"), ("merge", "Can create merge commits or conflicts"), ("reset", "Can lose uncommitted work permanently"),