diff --git a/src/components/GitDialog.tsx b/src/components/GitDialog.tsx index d1714318..06adc4df 100644 --- a/src/components/GitDialog.tsx +++ b/src/components/GitDialog.tsx @@ -182,7 +182,6 @@ export function GitDialog({ projectId, children, open, onOpenChange }: GitDialog await git.checkout({ dir: projectPath, ref: branchName, - force: true, }); toast({ @@ -1289,7 +1288,6 @@ export function GitDialog({ projectId, children, open, onOpenChange }: GitDialog await git.checkout({ dir: projectPath, ref: pr.sourceBranch, - force: true, }); await refetchGitStatus(); toast({ diff --git a/src/components/git/BranchManager.tsx b/src/components/git/BranchManager.tsx index c36ec0b5..55d8362f 100644 --- a/src/components/git/BranchManager.tsx +++ b/src/components/git/BranchManager.tsx @@ -223,7 +223,6 @@ export function BranchManager({ projectId, currentBranch, onBranchChange }: Bran await git.checkout({ dir: projectPath, ref: branchName, - force: true, }); toast({ diff --git a/src/lib/commands/git/checkout.ts b/src/lib/commands/git/checkout.ts index 5a9ac187..d43fc801 100644 --- a/src/lib/commands/git/checkout.ts +++ b/src/lib/commands/git/checkout.ts @@ -122,7 +122,6 @@ export class GitCheckoutCommand implements GitSubcommand { await this.git.checkout({ dir: cwd, ref: branchName, - force: true, }); return createSuccessResult(`Switched to branch '${branchName}'\n`); @@ -165,7 +164,6 @@ export class GitCheckoutCommand implements GitSubcommand { await this.git.checkout({ dir: cwd, ref: branchName, - force: true, }); return createSuccessResult(`Switched to a new branch '${branchName}'\n`); diff --git a/src/lib/git.ts b/src/lib/git.ts index 842c3abd..2cbd9477 100644 --- a/src/lib/git.ts +++ b/src/lib/git.ts @@ -1244,7 +1244,6 @@ export class Git { fs: this.fs, dir: options.dir, ref: expectedBranch, - force: true, }); } catch (checkoutError) { console.warn(`Failed to checkout branch ${expectedBranch}:`, checkoutError);