mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Checkout branch name, not commit oid
This commit is contained in:
1 file changed
+3
-4
@@ -146,13 +146,12 @@ export class ProjectsManager {
|
||||
force: true,
|
||||
});
|
||||
|
||||
// Directly checkout the remote commit to update working directory
|
||||
// This bypasses merge entirely and just makes the working directory
|
||||
// match the remote commit exactly. Safe for templates.
|
||||
// Checkout the branch (not the commit SHA) to update working directory
|
||||
// This keeps the repository on the branch instead of entering detached HEAD state
|
||||
// Using force: true to overwrite any local changes
|
||||
await this.git.checkout({
|
||||
dir: templatePath,
|
||||
ref: remoteOid,
|
||||
ref: branchName,
|
||||
force: true,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user