Documentation
¶
Overview ¶
internal/git/git.go
Index ¶
- Variables
- type Git
- func (g *Git) BranchExists(branch string) bool
- func (g *Git) Checkout(branch string) error
- func (g *Git) Commit(message string) error
- func (g *Git) CreateAndCheckout(name string) error
- func (g *Git) CreateBranch(name string) error
- func (g *Git) CurrentBranch() (string, error)
- func (g *Git) DeleteBranch(branch string) error
- func (g *Git) FastForward(branch string) error
- func (g *Git) Fetch() error
- func (g *Git) GetGitDir() string
- func (g *Git) GetMergeBase(a, b string) (string, error)
- func (g *Git) GetTip(branch string) (string, error)
- func (g *Git) HasStagedChanges() (bool, error)
- func (g *Git) IsDirty() (bool, error)
- func (g *Git) IsRebaseInProgress() bool
- func (g *Git) NeedsRebase(branch, parent string) (bool, error)
- func (g *Git) Push(branch string, force bool) error
- func (g *Git) Rebase(onto string) error
- func (g *Git) RebaseAbort() error
- func (g *Git) RebaseContinue() error
Constants ¶
This section is empty.
Variables ¶
var ErrDirtyWorkTree = errors.New("working tree has uncommitted changes")
ErrDirtyWorkTree is returned when the working tree has uncommitted changes.
Functions ¶
This section is empty.
Types ¶
type Git ¶
type Git struct {
// contains filtered or unexported fields
}
Git provides git operations for a repository.
func (*Git) BranchExists ¶
BranchExists checks if a branch exists.
func (*Git) CreateAndCheckout ¶
CreateAndCheckout creates a new branch and switches to it.
func (*Git) CreateBranch ¶
CreateBranch creates a new branch at the current HEAD.
func (*Git) CurrentBranch ¶
CurrentBranch returns the name of the current branch.
func (*Git) DeleteBranch ¶
DeleteBranch deletes a local branch.
func (*Git) FastForward ¶
FastForward fast-forwards a branch to its remote tracking branch.
func (*Git) GetMergeBase ¶
GetMergeBase returns the merge base of two branches.
func (*Git) HasStagedChanges ¶
HasStagedChanges returns true if there are staged changes.
func (*Git) IsRebaseInProgress ¶
IsRebaseInProgress checks if a rebase is in progress.
func (*Git) NeedsRebase ¶
NeedsRebase returns true if branch needs to be rebased onto parent.
func (*Git) RebaseAbort ¶
RebaseAbort aborts an in-progress rebase.
func (*Git) RebaseContinue ¶
RebaseContinue continues an in-progress rebase.