Skip to content

Commit c250964

Browse files
committed
feat(git): add --no-track flag when creating branches (#37)
This change adds the --no-track flag to git branch creation commands to prevent automatic tracking of remote branches. This ensures that local branches created with createBranchFrom do not automatically set up upstream tracking relationships.
1 parent bd2620e commit c250964

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/git/createBranch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { execAuto } from '@/core/git/exec';
22

33
export const createBranchFrom = async (cwd: string, branchName: string, base?: string) => {
4-
if (!base) return execAuto(cwd, ['branch', '-q', branchName]);
5-
return execAuto(cwd, ['branch', '-q', branchName, base]);
4+
if (!base) return execAuto(cwd, ['branch', '-q', '--no-track', branchName]);
5+
return execAuto(cwd, ['branch', '-q', '--no-track', branchName, base]);
66
};

0 commit comments

Comments
 (0)