git

package
v0.0.0-...-fca927e Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clone

func Clone(repoURL string, localPath string) (*repoImpl, error)

func Init

func Init(localPath string, opts InitOpts) (*repoImpl, error)

func Status

func Status()

Types

type CommitMetadata

type CommitMetadata struct {
	Hash        string
	Description string
	Date        time.Time
}

type InitOpts

type InitOpts struct {
	ConfigFile string
}

type Repo

type Repo interface {
	// Equivalent to `git checkout -b <branchName>`
	CreateBranch(branchName string) error
	// Commit metadata of the current HEAD
	Head() (CommitMetadata, error)
	// Name of the current active branch
	ActiveBranch() (string, error)
	// Equivalent to `git commit -A -m <message>`
	Commit(message string) (string, error)
}

Jump to

Keyboard shortcuts

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