From: Oleg Broytman Date: Tue, 20 Aug 2024 13:29:27 +0000 (+0300) Subject: Feat(update-remotes): Get additional remotes from `.git/config` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=edcbc84b529cdfdaf8e2012cef0e66a584ff7113;p=git-scripts.git Feat(update-remotes): Get additional remotes from `.git/config` --- diff --git a/update-remotes b/update-remotes index ead8e91..757bfb3 100755 --- a/update-remotes +++ b/update-remotes @@ -4,6 +4,8 @@ set -e branches="master ${1:+$@}" current="`git config --get --path remote.current.url`" || : origin="`git config --get --path remote.origin.url`" || : +web="`git config --get --path remote.web.url`" || : +remotes="`git config --get update-remotes.remotes`" || : if [ -n "$origin" ]; then if [ -n "$current" ]; then @@ -23,11 +25,15 @@ git fetch current { git pull --ff-only current master || git reset --hard current/master ; } git set-date -web="`git config --get --path remote.web.url`" if [ -n "$web" ]; then git push --force web $branches fi cd "$current" + +for remote in $remotes; do + git push --force $remote $branches +done + git pull origin exec git set-date