From e618f8015560142a2246441e6eab042c2b769d86 Mon Sep 17 00:00:00 2001 From: z3rOR0ne Date: Fri, 5 Aug 2022 02:49:25 -0700 Subject: [PATCH] :pencil2: Used different approach for multiple remotes --- scripts/bgit | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/scripts/bgit b/scripts/bgit index 80c43e7a..5d1c169c 100755 --- a/scripts/bgit +++ b/scripts/bgit @@ -250,7 +250,7 @@ if [ $numrepos -eq 0 ] ; then else # creates a list of repos and puts them in an array - remotearray=($(git remote)) + # remotearray=($(git remote)) # Grabs all new files newfiles=$(git status --short | grep '??' | awk '{print $2}' | tr '\n' ' ') # Grabs all modified files @@ -296,9 +296,10 @@ else git reset --hard ${commitarray[$version]} # and pushes it to remote repository - for ((i = 0; i < numrepos; i++)) ; do - git push --force ${remotearray[i]} ; - done + git remote | xargs -L1 git push --all + # for ((i = 0; i < numrepos; i++)) ; do + # git push --force ${remotearray[i]} ; + # done echo "${txtblue}bgit script has completed! goodbye!${txtwhite}" exit 0 @@ -399,9 +400,10 @@ else git commit -m "$gitmoji $cmessage" ; # pushes the commit to each repository - for ((i = 0; i < numrepos; i++)) ; do - git push ${remotearray[i]} ; - done + git remote | xargs -L1 git push --all + # for ((i = 0; i < numrepos; i++)) ; do + # git push ${remotearray[i]} ; + # done echo "${txtblue}bgit script has completed! goodbye!${txtwhite}" exit 0