fix: set upstream when pushing branch

This commit is contained in:
Joe Previte 2021-03-11 10:23:43 -07:00
parent b0861029c0
commit 6f638f1329
No known key found for this signature in database
GPG Key ID: 2C91590C6B742C24

View File

@ -85,7 +85,9 @@ main() {
if [[ -z $(git ls-remote --heads origin "$CURRENT_BRANCH") ]]; then if [[ -z $(git ls-remote --heads origin "$CURRENT_BRANCH") ]]; then
echo "Doesn't look like you've pushed this branch to remote" echo "Doesn't look like you've pushed this branch to remote"
echo -e "Pushing now using: git push origin $CURRENT_BRANCH\n" echo -e "Pushing now using: git push origin $CURRENT_BRANCH\n"
git push origin "$CURRENT_BRANCH" # Note: we need to set upstream as well or the gh pr create step will fail
# See: https://github.com/cli/cli/issues/575
git push -u origin "$CURRENT_BRANCH"
fi fi
echo "Going to try to update vscode for you..." echo "Going to try to update vscode for you..."