diff --git a/stack-updater/get_principal_branch.sh b/stack-updater/get_principal_branch.sh
deleted file mode 100644
index f37d1ca7aeeba9d1dbb3dc5f6830a2a8b0c89f8b..0000000000000000000000000000000000000000
--- a/stack-updater/get_principal_branch.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-if git branch -a | grep -q main
-then
-	echo "main";
-else
-	echo "master";
-fi
diff --git a/stack-updater/stack_updater.yml b/stack-updater/stack_updater.yml
index e9cf316fd03adb226788f3865fad103fab891f45..92064a085ab4e473fc2c687ff07c5e7bbf3318b5 100644
--- a/stack-updater/stack_updater.yml
+++ b/stack-updater/stack_updater.yml
@@ -15,10 +15,10 @@ update:
       - git checkout $current_version
       - git pull
       - node package-version-updater/versionUpdater.js -v $current_version
-      - git add package.json
+      - bash package-version-updater/stage_file.sh
       - git commit -m "Dependencies updated to $current_version"
       - npm version --allow-same-version $current_version
-      - branch=`bash get_principal_branch.sh`
+      - branch=`bash package-version-updater/get_principal_branch.sh`
       - echo ${branch}
       - git checkout ${branch}
       - git pull