Versions in this module Expand all Collapse all v1 v1.3.0 Feb 6, 2026 v1.2.6 Oct 21, 2025 v1.2.5 Oct 9, 2025 v1.2.4 Oct 5, 2025 v1.2.3 Oct 5, 2025 v1.2.2 Oct 1, 2025 Changes in this version type GitCommands + func (g *GitCommands) ResetToCommit(commitHash string) (string, error) + func (g *GitCommands) StashAll() (string, error) v1.2.1 Sep 15, 2025 v1.2.0 Sep 8, 2025 v1.1.0 Sep 8, 2025 Changes in this version + var ExecCommand = exec.Command + type Branch struct + IsCurrent bool + LastCommit string + Name string + type BranchOptions struct + Create bool + Delete bool + Name string + type CommitLog struct + AuthorInitials string + Graph string + SHA string + Subject string + type CommitOptions struct + Amend bool + Message string + type DiffOptions struct + Cached bool + Color bool + Commit1 string + Commit2 string + Stat bool + type GitCommands struct + func NewGitCommands() *GitCommands + func (g *GitCommands) AddFiles(paths []string) (string, error) + func (g *GitCommands) BlameFile(filePath string) (string, error) + func (g *GitCommands) Checkout(branchName string) (string, error) + func (g *GitCommands) CloneRepository(repoURL, directory string) (string, error) + func (g *GitCommands) Commit(options CommitOptions) (string, error) + func (g *GitCommands) Fetch(remote string, branch string) (string, error) + func (g *GitCommands) GetBranches() ([]*Branch, error) + func (g *GitCommands) GetCommitLogsGraph() ([]CommitLog, error) + func (g *GitCommands) GetGitRepoPath() (repoPath string, err error) + func (g *GitCommands) GetRepoInfo() (repoName string, branchName string, err error) + func (g *GitCommands) GetStashes() ([]*Stash, error) + func (g *GitCommands) GetStatus(options StatusOptions) (string, error) + func (g *GitCommands) GetUserName() (string, error) + func (g *GitCommands) InitRepository(path string) (string, error) + func (g *GitCommands) ListFiles() (string, error) + func (g *GitCommands) ManageBranch(options BranchOptions) (string, error) + func (g *GitCommands) ManageRemote(options RemoteOptions) (string, error) + func (g *GitCommands) ManageTag(options TagOptions) (string, error) + func (g *GitCommands) Merge(options MergeOptions) (string, error) + func (g *GitCommands) MoveFile(source, destination string) (string, error) + func (g *GitCommands) Pull(options PullOptions) (string, error) + func (g *GitCommands) Push(options PushOptions) (string, error) + func (g *GitCommands) Rebase(options RebaseOptions) (string, error) + func (g *GitCommands) RemoveFiles(paths []string, cached bool) (string, error) + func (g *GitCommands) RenameBranch(oldName, newName string) (string, error) + func (g *GitCommands) ResetFiles(paths []string) (string, error) + func (g *GitCommands) Restore(options RestoreOptions) (string, error) + func (g *GitCommands) Revert(commitHash string) (string, error) + func (g *GitCommands) ShowCommit(commitHash string) (string, error) + func (g *GitCommands) ShowDiff(options DiffOptions) (string, error) + func (g *GitCommands) ShowLog(options LogOptions) (string, error) + func (g *GitCommands) Stash(options StashOptions) (string, error) + func (g *GitCommands) Switch(branchName string) (string, error) + type LogOptions struct + All bool + Branch string + Color string + Format string + Graph bool + MaxCount int + Oneline bool + type MergeOptions struct + BranchName string + Message string + NoFastForward bool + type PullOptions struct + Branch string + Rebase bool + Remote string + type PushOptions struct + Branch string + Force bool + Remote string + SetUpstream bool + Tags bool + type RebaseOptions struct + Abort bool + BranchName string + Continue bool + Interactive bool + type RemoteOptions struct + Add bool + Name string + Remove bool + URL string + Verbose bool + type RestoreOptions struct + Paths []string + Source string + Staged bool + WorkingDir bool + type Stash struct + Branch string + Message string + Name string + type StashOptions struct + Apply bool + Drop bool + List bool + Message string + Pop bool + Push bool + Show bool + StashID string + type StatusOptions struct + Porcelain bool + type TagOptions struct + Commit string + Create bool + Delete bool + Message string + Name string