Skip to content

Commit 1818230

Browse files
committed
adding checkout branch
1 parent 6444ebb commit 1818230

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

electron/ipc/git.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,10 @@ export async function getCurrentBranch(projectRoot: string): Promise<string> {
533533
return getCurrentBranchName(projectRoot);
534534
}
535535

536+
export async function checkoutBranch(projectRoot: string, branchName: string): Promise<void> {
537+
await exec('git', ['checkout', branchName], { cwd: projectRoot });
538+
}
539+
536540
export async function getBranches(projectRoot: string): Promise<string[]> {
537541
const { stdout } = await exec('git', ['branch', '--list', '--format=%(refname:short)'], {
538542
cwd: projectRoot,

0 commit comments

Comments
 (0)