Skip to content

Commit

Permalink
[content-service] Fix checkout local HEAD branch
Browse files Browse the repository at this point in the history
  • Loading branch information
aledbf authored and roboquat committed Sep 27, 2022
1 parent 1537260 commit 57fdeaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/content-service/pkg/initializer/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func (ws *GitInitializer) realizeCloneTarget(ctx context.Context) (err error) {
}
case LocalBranch:
// checkout local branch based on remote HEAD
if err := ws.Git(ctx, "checkout", "origin/HEAD", "--no-track"); err != nil {
if err := ws.Git(ctx, "checkout", "-B", ws.CloneTarget, "origin/HEAD", "--no-track"); err != nil {
return err
}
case RemoteCommit:
Expand Down

0 comments on commit 57fdeaa

Please sign in to comment.