Skip to content

Commit fb8b39d

Browse files
authored
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 <cfang@redhat.com>
1 parent 720f495 commit fb8b39d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/argocd/git.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ func commitChangesGit(app *v1alpha1.Application, wbc *WriteBackConfig, changeLis
246246
if err != nil {
247247
return err
248248
}
249-
err = gitC.Push("origin", pushBranch, false)
249+
err = gitC.Push("origin", pushBranch, pushBranch != checkOutBranch)
250250
if err != nil {
251251
return err
252252
}

0 commit comments

Comments
 (0)