func (m *nativeGitClient) Push(remote string, branch string, force bool) error {
	args := []string{"push"}
	if force {
		args = append(args, "-f")
	}
	args = append(args, remote, branch)
	err := m.runCredentialedCmd("git", args...)
	if err != nil {
		return fmt.Errorf("could not push %s to %s: %v", branch, remote, err)
	}
	return nil
}
Push pushes local changes to the remote branch. If force is true, will force
the remote to accept the push.
package git
import (
	"fmt"
	"strings"
	"github.com/argoproj-labs/argocd-image-updater/pkg/log"
)
type CommitOptions struct {
	CommitMessageText string
	CommitMessagePath string
	SigningKey string
	SignOff bool
}
func (m *nativeGitClient) Commit(pathSpec string, opts *CommitOptions) error {
	defaultCommitMsg := "Update parameters"
	args := []string{"commit"}
	if pathSpec == "" || pathSpec == "*" {
		args = append(args, "-a")
	}
	if opts.SigningKey != "" {
		args = append(args, "-S", opts.SigningKey)
	}
	if opts.SignOff {
		args = append(args, "-s")
	}
	if opts.CommitMessageText != "" {
		args = append(args, "-m", opts.CommitMessageText)
	} else if opts.CommitMessagePath != "" {
		args = append(args, "-F", opts.CommitMessagePath)
	} else {
		args = append(args, "-m", defaultCommitMsg)
	}
	out, err := m.runCmd(args...)
	if err != nil {
		log.Errorf(out)
		return err
	}
	return nil
}
func (m *nativeGitClient) Branch(sourceBranch string, targetBranch string) error {
	if sourceBranch != "" {
		_, err := m.runCmd("checkout", sourceBranch)
		if err != nil {
			return fmt.Errorf("could not checkout source branch: %v", err)
		}
	}
	_, err := m.runCmd("branch", targetBranch)
	if err != nil {
		return fmt.Errorf("could not create new branch: %v", err)
	}
	return nil
}