diff --git a/internal/git/git.go b/internal/git/git.go index a35cb19..59cd9cf 100644 --- a/internal/git/git.go +++ b/internal/git/git.go @@ -92,6 +92,13 @@ func EnsureBranchCommit(ctx context.Context, repo, branch string, env []string) if err != nil { return err } + _, stderr, code, err := runNetwork(ctx, repo, "push", Remote, commit+":refs/heads/"+branch) + if err != nil { + return err + } + if code != 0 { + return fmt.Errorf("pushing %s to %s: exit status %d: %s", branch, Remote, code, stderr) + } _, err = run(ctx, repo, "update-ref", "refs/heads/"+branch, commit, "") return err }