From 09eb0a8be5bf7cdc39ee8110fd06127a31e0ece2 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Wed, 21 Feb 2024 06:40:16 +0300 Subject: [PATCH] Git : Gpsa now pushes to all remotes. --- .config/bash/module/Git.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.config/bash/module/Git.sh b/.config/bash/module/Git.sh index 096c8ad..8d993cc 100644 --- a/.config/bash/module/Git.sh +++ b/.config/bash/module/Git.sh @@ -5,7 +5,11 @@ function gps() { # Git push all (branches). Useful for pushing all stuff to a new remote. function gpsa() { - git push "${1}" --tags "refs/remotes/origin/*:refs/heads/*" + local remotes=($(git remote)) + for remote in ${remotes[@]}; do + echo -n "${remote}: " + git push "${remote}" --tags "refs/remotes/origin/*:refs/heads/*" + done } # Git force push.