From f1c907bc263b5828810fdb87852090902f75f261 Mon Sep 17 00:00:00 2001 From: Moiz Adnan <67912355+MoizAdnan@users.noreply.github.com> Date: Sun, 6 Aug 2023 20:18:41 +0500 Subject: [PATCH] Added new local branch flag (#142) --- src/main/handlers/Git/Git-helper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/handlers/Git/Git-helper.ts b/src/main/handlers/Git/Git-helper.ts index 97aa9e3d..bd354c35 100644 --- a/src/main/handlers/Git/Git-helper.ts +++ b/src/main/handlers/Git/Git-helper.ts @@ -13,7 +13,7 @@ export const checkout = async (repoPath: string, branch: string) => { } export const checkoutBranch = async (repoPath: string, localBranch: string, branch: string) => { - const command = `git -C ${repoPath} checkout ${localBranch} ${branch}` + const command = `git -C ${repoPath} checkout -b ${localBranch} ${branch}` const { stdout } = await exec(command, true) return stdout?.toString() }