From bd8de7a8ea3ff332c4b0181b13650789d35cef21 Mon Sep 17 00:00:00 2001 From: di-sukharev Date: Wed, 15 Mar 2023 14:46:15 +0800 Subject: [PATCH] feat(commit.ts): add '-u origin HEAD' flag to 'git push' command to set upstream branch and push current branch to it --- src/commands/commit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/commit.ts b/src/commands/commit.ts index e791b32..50b19c9 100644 --- a/src/commands/commit.ts +++ b/src/commands/commit.ts @@ -56,7 +56,7 @@ ${chalk.grey('——————————————————')}` const pushSpinner = spinner(); pushSpinner.start('Running `git push`'); - const { stdout } = await execa('git', ['push']); + const { stdout } = await execa('git', ['push', '-u', 'origin', 'HEAD']); pushSpinner.stop(`${chalk.green('✔')} successfully pushed all commits`); if (stdout) outro(stdout);