feat: track remote branch when checkout to that branch

This commit is contained in:
Cheng Liu 2024-04-12 15:37:49 -07:00
parent c3f9a14211
commit 465f67aa1a
No known key found for this signature in database
GPG key ID: EEC8452F7DB85CD6

View file

@ -237,6 +237,9 @@ export class CheckoutCommand implements ICommand<ICheckoutCommandOptions> {
this._gitService.executeGitCommand({ this._gitService.executeGitCommand({
args: ['branch', branch, `${remote}/${branch}`] args: ['branch', branch, `${remote}/${branch}`]
}); });
this._gitService.executeGitCommand({
args: ['remote', 'set-branches', '--add', remote, branch]
});
} }
const branchExistsInLocal: boolean = Boolean( const branchExistsInLocal: boolean = Boolean(