]> git.phdru.name Git - git-scripts.git/commitdiff
Set upstream to web/master on publishing to web
authorOleg Broytman <phd@phdru.name>
Sun, 5 Jun 2016 14:03:25 +0000 (17:03 +0300)
committerOleg Broytman <phd@phdru.name>
Sun, 5 Jun 2016 14:03:25 +0000 (17:03 +0300)
publish2web
update

index fded7bfa0f61d9b5b56def8194442c212adfd4cf..567cf14736f4ba5be39d433c78a80a55319e3909 100755 (executable)
@@ -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 205c7c6f21ab59737d825e73d302a3359dfc2338..fd10a24b725bd744ab58db2f5282a70e05641b2e 100755 (executable)
--- 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