From: Oleg Broytman Date: Sun, 5 Jun 2016 14:03:25 +0000 (+0300) Subject: Set upstream to web/master on publishing to web X-Git-Url: https://git.phdru.name/?p=git-scripts.git;a=commitdiff_plain;h=c0680b259d2ca7adfa83085358adc0b0f7b760c0 Set upstream to web/master on publishing to web --- diff --git a/publish2web b/publish2web index fded7bf..567cf14 100755 --- a/publish2web +++ b/publish2web @@ -48,4 +48,5 @@ cd "$source_dir" && if [ -n "$directories" ]; then dest_dir="$directories/$dest_dir" fi && -exec git remote add web "$HOME"/Internet/WWW/htdocs/git.phdru.name/"$dest_dir" +git remote add web "$HOME"/Internet/WWW/htdocs/git.phdru.name/"$dest_dir" && +exec git branch --set-upstream-to=web/master master diff --git a/update b/update index 205c7c6..fd10a24 100755 --- a/update +++ b/update @@ -20,7 +20,7 @@ git pull --ff-only current master && web="`git config --get --path remote.web.url`" && if [ -n "$web" ]; then - git push web master + git push web fi && cd "$current" && exec git pull origin