From fc1108e1ca8e1e0457e608c16527fff74297d271 Mon Sep 17 00:00:00 2001 From: Adam Wilson Date: Thu, 21 Aug 2025 12:55:29 -0600 Subject: [PATCH] delete branch on remote after merge --- git_remotes_update.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/git_remotes_update.sh b/git_remotes_update.sh index 0cab52e7c..b3f5cf060 100755 --- a/git_remotes_update.sh +++ b/git_remotes_update.sh @@ -18,7 +18,7 @@ echo "performing 'git pull'" git pull echo -e "${BLUE}🔄 Fetching all remote branches...${NC}" -git fetch --all +git fetch --all --prune echo -e "${BLUE}🔍 Finding auto-generated batch branches...${NC}" echo @@ -84,6 +84,8 @@ echo "$batch_branches" | while read -r branch; do else echo -e "${GREEN}✅ Successfully merged $branch${NC}" fi + echo -e "${BLUE}🗑️ Deleting remote branch ${GREEN}$branch${NC}...${NC}" + git push origin --delete "$branch" fi done