From 59e507b9943a2decd3573acbdc7ad26b87c1c8e5 Mon Sep 17 00:00:00 2001 From: Cheng Fang Date: Thu, 3 Oct 2024 16:14:58 -0400 Subject: [PATCH] fix(git): write back to custom git branch failed by rejected push: tip of your current branch is behind 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 }