Git : Gpsa now pushes to all remotes.

This commit is contained in:
Dmitry Voronin 2024-02-21 06:40:16 +03:00
parent 7a4632102e
commit 09eb0a8be5

View file

@ -5,7 +5,11 @@ function gps() {
# Git push all (branches). Useful for pushing all stuff to a new remote. # Git push all (branches). Useful for pushing all stuff to a new remote.
function gpsa() { 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. # Git force push.