From 465f67aa1a4d3adac7d4fdd903b1d11ceedc5f0d Mon Sep 17 00:00:00 2001 From: Cheng Liu Date: Fri, 12 Apr 2024 15:37:49 -0700 Subject: [PATCH] feat: track remote branch when checkout to that branch --- apps/sparo-lib/src/cli/commands/checkout.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/sparo-lib/src/cli/commands/checkout.ts b/apps/sparo-lib/src/cli/commands/checkout.ts index d542b6e..5aad10d 100644 --- a/apps/sparo-lib/src/cli/commands/checkout.ts +++ b/apps/sparo-lib/src/cli/commands/checkout.ts @@ -237,6 +237,9 @@ export class CheckoutCommand implements ICommand { this._gitService.executeGitCommand({ args: ['branch', branch, `${remote}/${branch}`] }); + this._gitService.executeGitCommand({ + args: ['remote', 'set-branches', '--add', remote, branch] + }); } const branchExistsInLocal: boolean = Boolean(