diff --git a/internal/source/gitea/gitea.go b/internal/source/gitea/gitea.go index 80b0baa..c3c513c 100644 --- a/internal/source/gitea/gitea.go +++ b/internal/source/gitea/gitea.go @@ -538,7 +538,7 @@ func (g Gitea) fetchCheckout(ctx context.Context, repo *git.Repository, branch, if pullExist { if err = wtree.Checkout(&git.CheckoutOptions{ - Branch: plumbing.NewBranchReferenceName(branch), + Branch: headRef.Name(), Create: false, Force: true, }); err != nil && err != git.ErrBranchExists {