git

package
v1.0.50 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationError

type AuthenticationError struct {
	URL string
	Err error
}

func (*AuthenticationError) Error

func (e *AuthenticationError) Error() string

func (*AuthenticationError) Unwrap

func (e *AuthenticationError) Unwrap() error

type BranchNotFoundError

type BranchNotFoundError struct {
	BranchName string
}

func (*BranchNotFoundError) Error

func (e *BranchNotFoundError) Error() string

type DirtyWorkingTreeError

type DirtyWorkingTreeError struct {
	Files []string
}

func (*DirtyWorkingTreeError) Error

func (e *DirtyWorkingTreeError) Error() string

type Git

type Git struct {
	// contains filtered or unexported fields
}

func New

func New(repoPath string) *Git

func (*Git) Add

func (g *Git) Add(filename string) error

func (*Git) AddAll

func (g *Git) AddAll() error

func (*Git) AddMultiple

func (g *Git) AddMultiple(filenames []string) error

func (*Git) Checkout added in v1.0.48

func (g *Git) Checkout(branch string) error

func (*Git) Clone

func (g *Git) Clone(url string) error

func (*Git) Commit

func (g *Git) Commit(message string) error

func (*Git) CreateBranch added in v1.0.48

func (g *Git) CreateBranch(branch string) error

func (*Git) DeleteBranch added in v1.0.48

func (g *Git) DeleteBranch(branch string, force bool) error

func (*Git) Fetch added in v1.0.48

func (g *Git) Fetch(remote string) error

func (*Git) GetCommitMessage added in v1.0.48

func (g *Git) GetCommitMessage(ref string) (string, error)

func (*Git) GetCommitTitle added in v1.0.48

func (g *Git) GetCommitTitle(ref string) (string, error)

func (*Git) GetCurrentBranchPublic added in v1.0.48

func (g *Git) GetCurrentBranchPublic() (string, error)

func (*Git) GetRemoteURL added in v1.0.48

func (g *Git) GetRemoteURL(remote string) (string, error)

func (*Git) GetStatus

func (g *Git) GetStatus() (*StatusInfo, error)

func (*Git) HasChanges added in v1.0.48

func (g *Git) HasChanges() (bool, error)

func (*Git) HasRemote

func (g *Git) HasRemote() bool

func (*Git) Init

func (g *Git) Init() error

func (*Git) IsRepo

func (g *Git) IsRepo() bool

func (*Git) ListBranches added in v1.0.48

func (g *Git) ListBranches() ([]string, error)

func (*Git) Pull

func (g *Git) Pull() error

func (*Git) Push

func (g *Git) Push() error

func (*Git) PushBranch added in v1.0.48

func (g *Git) PushBranch(branch string) error

func (*Git) Remove

func (g *Git) Remove(filename string) error

func (*Git) SetRemote

func (g *Git) SetRemote(name, url string) error

type GitCommandError

type GitCommandError struct {
	Command string
	Output  string
	Err     error
}

func (*GitCommandError) Error

func (e *GitCommandError) Error() string

func (*GitCommandError) Unwrap

func (e *GitCommandError) Unwrap() error

type InvalidRemoteURLError

type InvalidRemoteURLError struct {
	URL string
}

func (*InvalidRemoteURLError) Error

func (e *InvalidRemoteURLError) Error() string

type MergeConflictError

type MergeConflictError struct {
	Files []string
}

func (*MergeConflictError) Error

func (e *MergeConflictError) Error() string

type NetworkError

type NetworkError struct {
	Operation string
	URL       string
	Err       error
}

func (*NetworkError) Error

func (e *NetworkError) Error() string

func (*NetworkError) Unwrap

func (e *NetworkError) Unwrap() error

type RemoteNotFoundError

type RemoteNotFoundError struct {
	RemoteName string
}

func (*RemoteNotFoundError) Error

func (e *RemoteNotFoundError) Error() string

type RepoNotFoundError

type RepoNotFoundError struct {
	Path string
}

func (*RepoNotFoundError) Error

func (e *RepoNotFoundError) Error() string

type StatusInfo

type StatusInfo struct {
	Ahead  int
	Behind int
	Remote string
	Dirty  bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL