From fb8b39dae73229c751f22d67324d4d194db67deb Mon Sep 17 00:00:00 2001 From: Cheng Fang Date: Fri, 4 Oct 2024 09:09:30 -0400 Subject: [PATCH] fix(git): write back to custom git branch failed by rejected push: tip of your current branch is behind (#882) Signed-off-by: Cheng Fang --- pkg/argocd/git.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/argocd/git.go b/pkg/argocd/git.go index 2bc08f42..13e62b66 100644 --- a/pkg/argocd/git.go +++ b/pkg/argocd/git.go @@ -246,7 +246,7 @@ func commitChangesGit(app *v1alpha1.Application, wbc *WriteBackConfig, changeLis if err != nil { return err } - err = gitC.Push("origin", pushBranch, false) + err = gitC.Push("origin", pushBranch, pushBranch != checkOutBranch) if err != nil { return err }