Versions in this module Expand all Collapse all v0 v0.1.1 Jan 22, 2026 v0.1.0 Jan 22, 2026 Changes in this version + var ErrAuthFailure = errors.New("authentication failed") + var ErrMergeConflict = errors.New("merge conflict") + var ErrNotARepo = errors.New("not a git repository") + var ErrRebaseConflict = errors.New("rebase conflict") + var ExcludedContextFiles = []string + func CheckExcludedFilesExist(repoPath string) []string + func ConfigureSparseCheckout(repoPath string) error + func IsSparseCheckoutConfigured(repoPath string) bool + type Git struct + func NewGit(workDir string) *Git + func NewGitWithDir(gitDir, workDir string) *Git + func (g *Git) AbortMerge() error + func (g *Git) AbortRebase() error + func (g *Git) Add(paths ...string) error + func (g *Git) BranchCreatedDate(branch string) (string, error) + func (g *Git) BranchExists(name string) (bool, error) + func (g *Git) BranchPushedToRemote(localBranch, remote string) (bool, int, error) + func (g *Git) CheckConflicts(source, target string) ([]string, error) + func (g *Git) CheckUncommittedWork() (*UncommittedWorkStatus, error) + func (g *Git) Checkout(ref string) error + func (g *Git) Clone(url, dest string) error + func (g *Git) CloneBare(url, dest string) error + func (g *Git) CloneBareWithReference(url, dest, reference string) error + func (g *Git) CloneWithReference(url, dest, reference string) error + func (g *Git) Commit(message string) error + func (g *Git) CommitAll(message string) error + func (g *Git) CommitsAhead(base, branch string) (int, error) + func (g *Git) CountCommitsBehind(ref string) (int, error) + func (g *Git) CreateBranch(name string) error + func (g *Git) CreateBranchFrom(name, ref string) error + func (g *Git) CurrentBranch() (string, error) + func (g *Git) DefaultBranch() string + func (g *Git) DeleteBranch(name string, force bool) error + func (g *Git) DeleteRemoteBranch(remote, branch string) error + func (g *Git) Fetch(remote string) error + func (g *Git) FetchBranch(remote, branch string) error + func (g *Git) HasUncommittedChanges() (bool, error) + func (g *Git) IsAncestor(ancestor, descendant string) (bool, error) + func (g *Git) IsRepo() bool + func (g *Git) ListBranches(pattern string) ([]string, error) + func (g *Git) Merge(branch string) error + func (g *Git) MergeNoFF(branch, message string) error + func (g *Git) Pull(remote, branch string) error + func (g *Git) Push(remote, branch string, force bool) error + func (g *Git) Rebase(onto string) error + func (g *Git) RemoteBranchExists(remote, branch string) (bool, error) + func (g *Git) RemoteDefaultBranch() string + func (g *Git) RemoteURL(remote string) (string, error) + func (g *Git) Remotes() ([]string, error) + func (g *Git) ResetBranch(name, ref string) error + func (g *Git) Rev(ref string) (string, error) + func (g *Git) StashCount() (int, error) + func (g *Git) Status() (*GitStatus, error) + func (g *Git) UnpushedCommits() (int, error) + func (g *Git) WorkDir() string + func (g *Git) WorktreeAdd(path, branch string) error + func (g *Git) WorktreeAddDetached(path, ref string) error + func (g *Git) WorktreeAddExisting(path, branch string) error + func (g *Git) WorktreeAddExistingForce(path, branch string) error + func (g *Git) WorktreeAddFromRef(path, branch, startPoint string) error + func (g *Git) WorktreeList() ([]Worktree, error) + func (g *Git) WorktreePrune() error + func (g *Git) WorktreeRemove(path string, force bool) error + type GitStatus struct + Added []string + Clean bool + Deleted []string + Modified []string + Untracked []string + type UncommittedWorkStatus struct + HasUncommittedChanges bool + ModifiedFiles []string + StashCount int + UnpushedCommits int + UntrackedFiles []string + func (s *UncommittedWorkStatus) Clean() bool + func (s *UncommittedWorkStatus) String() string + type Worktree struct + Branch string + Commit string + Path string