From 90417a7a187884e066ac67163c82f25440aae2ce Mon Sep 17 00:00:00 2001 From: joygnu Date: Tue, 16 Jul 2024 20:23:36 +0200 Subject: [PATCH] Upload files to "/" --- push.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 push.sh diff --git a/push.sh b/push.sh new file mode 100644 index 0000000..49d581c --- /dev/null +++ b/push.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# Function to push to all remotes +push_to_all_remotes() { + # Get a list of all remotes + remotes=$(git remote) + + # Check if there are no remotes + if [ -z "$remotes" ]; then + echo "No remotes found." + exit 1 + fi + + # Loop through each remote and push + for remote in $remotes; do + echo "Pushing to remote '$remote'..." + git push "$remote" --all + git push "$remote" --tags + echo "Push to remote '$remote' completed." + done +} + +# Execute the function +push_to_all_remotes +