From a7f721ab0bbd0e1d963d526a8f01b7da96bfc5a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B4=D8=B1=D9=83=D8=A9=20=D8=AE=D8=A8=D9=8A=D8=B1=20?= =?UTF-8?q?=D8=A7=D9=84=D9=85=D8=AD=D8=AF=D9=88=D8=AF=D8=A9?= Date: Sun, 18 Aug 2024 13:42:31 +0300 Subject: [PATCH] Delete checkout_preprod_branches_Extracted_names.sh --- checkout_preprod_branches_Extracted_names.sh | 32 -------------------- 1 file changed, 32 deletions(-) delete mode 100755 checkout_preprod_branches_Extracted_names.sh diff --git a/checkout_preprod_branches_Extracted_names.sh b/checkout_preprod_branches_Extracted_names.sh deleted file mode 100755 index 382f7eca1..000000000 --- a/checkout_preprod_branches_Extracted_names.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -# Prune worktree references to remove any missing worktrees -git worktree prune - -# List remote branches that start with 'origin/preprod' -for branch in $(git branch -r | grep 'origin/preprod' | sed 's|origin/||'); do - # Extract the directory name without 'preprod_' prefix - dir_name=$(echo $branch | sed 's|^preprod_||') - - # Debug output - echo "Processing branch: $branch" - echo "Directory name: $dir_name" - - # Create the directory if it doesn't exist - mkdir -p "../${dir_name}" - - # Add the worktree - git worktree add "../${dir_name}" "origin/${branch}" || { - echo "Failed to add worktree for branch ${branch}" - continue - } - - # Change to the new worktree directory and check out the branch - cd "../${dir_name}" - git checkout "${branch}" || { - echo "Failed to checkout branch ${branch} in directory ${dir_name}" - continue - } - cd - > /dev/null -done -