Skip to content
TypeScript

fix: use explicit refspec for push in worktrees with slashed branch names (#1684)

Ishand2822a8883fc
diff --git a/apps/server/src/git/Layers/GitCore.ts b/apps/server/src/git/Layers/GitCore.ts
index 98b1400aba1..b0140641190 100644
--- a/apps/server/src/git/Layers/GitCore.ts
+++ b/apps/server/src/git/Layers/GitCore.ts
@@ -1423,7 +1423,7 @@ export const makeGitCore = Effect.fn("makeGitCore")(function* (options?: {
"push",
"-u",
publishRemoteName,
- branch,
+ `HEAD:refs/heads/${branch}`,
]);
return {
status: "pushed" as const,