Versions in this module Expand all Collapse all v1 v1.23.14 Apr 4, 2026 v1.23.13 Mar 26, 2026 Changes in this version + var ErrNoSuchRemote = errors.New("no such remote") + var ErrNotRepository = errors.New("not a git repository") + type Cli struct + func NewCli(commandRunner exec.CommandRunner) *Cli + func (cli *Cli) AddFile(ctx context.Context, repositoryPath string, filespec string) error + func (cli *Cli) AddFileExecPermission(ctx context.Context, repositoryPath string, file string) error + func (cli *Cli) AddRemote(ctx context.Context, repositoryPath string, remoteName string, ...) error + func (cli *Cli) CheckInstalled(ctx context.Context) error + func (cli *Cli) Commit(ctx context.Context, repositoryPath string, message string) error + func (cli *Cli) GetCurrentBranch(ctx context.Context, repositoryPath string) (string, error) + func (cli *Cli) GetRemoteUrl(ctx context.Context, repositoryPath string, remoteName string) (string, error) + func (cli *Cli) GetRepoRoot(ctx context.Context, repositoryPath string) (string, error) + func (cli *Cli) GetStatus(ctx context.Context, repositoryPath string) (string, error) + func (cli *Cli) InitRepo(ctx context.Context, repositoryPath string) error + func (cli *Cli) InstallUrl() string + func (cli *Cli) IsDirty(ctx context.Context, repositoryPath string) (bool, error) + func (cli *Cli) IsUntrackedFile(ctx context.Context, repositoryPath string, filePath string) (bool, error) + func (cli *Cli) ListStagedFiles(ctx context.Context, repositoryPath string) (string, error) + func (cli *Cli) Name() string + func (cli *Cli) PushUpstream(ctx context.Context, repositoryPath string, origin string, branch string) error + func (cli *Cli) SetCredentialStore(ctx context.Context, repositoryPath string) error + func (cli *Cli) SetGitHubAuthForRepo(ctx context.Context, repositoryPath, credential, ghPath string) error + func (cli *Cli) ShallowClone(ctx context.Context, repositoryPath string, branch string, target string) error + func (cli *Cli) UpdateRemote(ctx context.Context, repositoryPath string, remoteName string, ...) error