diff options
-rwxr-xr-x | git-init-remote | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/git-init-remote b/git-init-remote index 043a780..71b9dd4 100755 --- a/git-init-remote +++ b/git-init-remote | |||
@@ -58,13 +58,14 @@ ssh "$GITREMOTE" chmod +x "$remote/hooks/post-update" | |||
58 | echo "git remote add origin \"$GITREMOTE:$remote\"" | 58 | echo "git remote add origin \"$GITREMOTE:$remote\"" |
59 | git remote add origin "$GITREMOTE:$remote" | 59 | git remote add origin "$GITREMOTE:$remote" |
60 | 60 | ||
61 | echo -n "Push to remote?" | 61 | echo -n "Push to remote? " |
62 | read | 62 | read |
63 | 63 | ||
64 | case "$REPLY" in | 64 | case "$REPLY" in |
65 | y*|Y*|'') | 65 | y*|Y*|'') |
66 | echo git push -u origin main | 66 | branch="$(git branch --show-current)" |
67 | git push -u origin main | 67 | echo git push -u origin "$branch" |
68 | git push -u origin "$branch" | ||
68 | ;; | 69 | ;; |
69 | *) ;; | 70 | *) ;; |
70 | esac | 71 | esac |