git

package
v0.1.0-rc.10 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Git

type Git struct {
	WorkDir string
}

Git wraps the git CLI for repository operations.

func New

func New(workDir string) *Git

New creates a new Git instance for the given working directory.

func (*Git) AbortMerge

func (g *Git) AbortMerge() error

AbortMerge aborts an in-progress merge.

func (*Git) AbortRebase

func (g *Git) AbortRebase() error

AbortRebase aborts an in-progress rebase.

func (*Git) Checkout

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

func (*Git) ConfigureIdentity

func (g *Git) ConfigureIdentity(name, email string) error

ConfigureIdentity sets the local git user identity for commits/merges if not already set.

func (*Git) CreateBranch

func (g *Git) CreateBranch(name, from string) error

func (*Git) CurrentBranch

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

func (*Git) Diff

func (g *Git) Diff(base, head string) (string, error)

func (*Git) Fetch

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

func (*Git) ForcePush

func (g *Git) ForcePush(remote, branch string) error

func (*Git) HasConflicts

func (g *Git) HasConflicts() bool

func (*Git) HeadSHA

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

func (*Git) IsMerging

func (g *Git) IsMerging() bool

IsMerging returns true if a merge is in progress (MERGE_HEAD exists).

func (*Git) Merge

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

func (*Git) Pull

func (g *Git) Pull(remote, branch string) error

func (*Git) Push

func (g *Git) Push(remote, branch string) error

func (*Git) Rebase

func (g *Git) Rebase(onto string) error

Jump to

Keyboard shortcuts

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