X-Git-Url: https://git.phdru.name/?p=git-scripts.git;a=blobdiff_plain;f=update-remotes;h=b164567bc369ac2ddc58d733bf22bb1a85b654dc;hp=4c59b31f8512c2612eb2ec074f0b246d3f3510b9;hb=HEAD;hpb=f44ddfda37f0e9da0703067eb0db2adfd765ec48 diff --git a/update-remotes b/update-remotes index 4c59b31..dca6f3f 100755 --- a/update-remotes +++ b/update-remotes @@ -2,6 +2,7 @@ current="`git config --get --path remote.current.url`" origin="`git config --get --path remote.origin.url`" +branches="master ${1:+$@}" if [ -n "$origin" ]; then if [ -n "$current" ]; then @@ -18,10 +19,13 @@ fi 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 web "$@" + git push --force web $branches fi && -cd "$current" && exec git pull origin +cd "$current" && +git pull origin && +exec git set-date