git

package
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: MIT Imports: 4 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 {
	// contains filtered or unexported fields
}

func New

func New(cwd string) *Git

func NewWithRunner

func NewWithRunner(cwd string, r Runner) *Git

func (*Git) BranchExists

func (g *Git) BranchExists(name string) (bool, error)

func (*Git) Checkout

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

func (*Git) ConfigGet

func (g *Git) ConfigGet(key string) (string, error)

func (*Git) ConfigSet

func (g *Git) ConfigSet(key, value string) error

func (*Git) CreateBranch

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

func (*Git) CurrentBranch

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

func (*Git) Fetch

func (g *Git) Fetch() error

func (*Git) IsDirty

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

func (*Git) IsInsideRepo

func (g *Git) IsInsideRepo() bool

func (*Git) ListLocalBranches

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

func (*Git) PushWithLease

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

func (*Git) Rebase

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

func (*Git) RebaseOnto

func (g *Git) RebaseOnto(newBase, oldBase, branch string) error

func (*Git) RemoteExists

func (g *Git) RemoteExists(branch string) (bool, error)

func (*Git) RevParse

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

func (*Git) UpdateRef

func (g *Git) UpdateRef(refname, sha string) error

type Runner

type Runner func(args ...string) (stdout, stderr []byte, err error)

Jump to

Keyboard shortcuts

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