git

package module
v0.3.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 7 Imported by: 0

README

git

Domain-grouped interfaces and backend orchestration for Git repository operations. The root package exposes capability-oriented interfaces (refs, remotes, config, diff, log, blame, index, commits, …) and shared types; concrete implementations live in backend sub-packages (embedded and cli). A *Repo composes those backends behind a single ergonomic surface.

Install

go get github.com/kbukum/gokit/git

Quick Start

package main

import (
    "fmt"

    "github.com/kbukum/gokit/git"
)

func main() {
    repo, err := git.Open(".")
    if err != nil {
        panic(err)
    }

    head, err := repo.Head()
    if err != nil {
        panic(err)
    }
    fmt.Println("HEAD:", head)

    dirty, _ := repo.IsDirty()
    fmt.Println("dirty:", dirty)
}

Key Types & Functions

Name Description
Open() / Discover() Open a repository at, or by discovering upward from, a path
Clone() / Init() / InitBare() Create repositories
Repo Composed repository handle over the embedded + CLI backends
Repository / Executor / RefManager / RemoteManager / ConfigReader Capability interfaces
Differ / TreeReader / LogReader / Blamer / Inspector / IndexManager / Committer Read/inspect and mutation capabilities
Option (Open/Clone/… variadic) Backend and behavior configuration
Err* (e.g. ErrRepoNotFound, ErrRefNotFound, ErrConflict) Typed AppError constructors

Concrete backends live under git/embedded and git/cli.


⬅ Back to main README

Documentation

Overview

Package git provides domain-grouped interfaces and backend orchestration for Git repository operations.

The root package exposes capability-oriented interfaces and shared types, while concrete implementations live in backend sub-packages such as embedded and cli.

Index

Constants

View Source
const (
	FileAdded       = model.FileAdded
	FileModified    = model.FileModified
	FileDeleted     = model.FileDeleted
	FileRenamed     = model.FileRenamed
	FileCopied      = model.FileCopied
	FileUntracked   = model.FileUntracked
	FileIgnored     = model.FileIgnored
	FileTypeChanged = model.FileTypeChanged
	FileConflicted  = model.FileConflicted
)
View Source
const (
	Staged     = model.Staged
	Unstaged   = model.Unstaged
	Untracked  = model.Untracked
	Conflicted = model.Conflicted
)
View Source
const (
	EntryKindBlob      = model.EntryKindBlob
	EntryKindTree      = model.EntryKindTree
	EntryKindSubmodule = model.EntryKindSubmodule
)
View Source
const (
	LocalBranches  = model.LocalBranches
	RemoteBranches = model.RemoteBranches
	AllBranches    = model.AllBranches
)
View Source
const (
	SignFormatDefault = model.SignFormatDefault
	SignFormatOpenPGP = model.SignFormatOpenPGP
	SignFormatSSH     = model.SignFormatSSH
	SignFormatX509    = model.SignFormatX509
)
View Source
const (
	ResetMixed = model.ResetMixed
	ResetSoft  = model.ResetSoft
	ResetHard  = model.ResetHard
)
View Source
const (
	DefaultBranch = model.DefaultBranch
)

Variables

View Source
var (
	WithPreferCLI                 = model.WithPreferCLI
	WithCLIPath                   = model.WithCLIPath
	WithTransport                 = model.WithTransport
	WithSigning                   = model.WithSigning
	WithExtraArgs                 = model.WithExtraArgs
	WithDiffContext               = model.WithDiffContext
	WithDiffNameOnly              = model.WithDiffNameOnly
	WithDiffExtraArgs             = model.WithDiffExtraArgs
	WithLogExtraArgs              = model.WithLogExtraArgs
	WithLineRange                 = model.WithLineRange
	WithIgnoreWhitespace          = model.WithIgnoreWhitespace
	WithBlameExtraArgs            = model.WithBlameExtraArgs
	WithCommitAuthor              = model.WithCommitAuthor
	WithCommitCommitter           = model.WithCommitCommitter
	WithCommitSign                = model.WithCommitSign
	WithCommitAmend               = model.WithCommitAmend
	WithCommitExtraArgs           = model.WithCommitExtraArgs
	WithFetchPrune                = model.WithFetchPrune
	WithFetchDepth                = model.WithFetchDepth
	WithFetchRefspecs             = model.WithFetchRefspecs
	WithFetchExtraArgs            = model.WithFetchExtraArgs
	WithPushForce                 = model.WithPushForce
	WithPushRefspecs              = model.WithPushRefspecs
	WithPushExtraArgs             = model.WithPushExtraArgs
	WithDescribeMatch             = model.WithDescribeMatch
	WithDescribeAnnotatedTagsOnly = model.WithDescribeAnnotatedTagsOnly
	WithDescribeLong              = model.WithDescribeLong
	WithDescribeAbbreviated       = model.WithDescribeAbbreviated
	WithDescribeAlways            = model.WithDescribeAlways
	WithDescribeExtraArgs         = model.WithDescribeExtraArgs
	WithGrepPathspecs             = model.WithGrepPathspecs
	WithGrepIgnoreCase            = model.WithGrepIgnoreCase
	WithGrepLineNumbers           = model.WithGrepLineNumbers
	WithGrepExtraArgs             = model.WithGrepExtraArgs
	WithMergeCommit               = model.WithMergeCommit
	WithMergeFFOnly               = model.WithMergeFFOnly
	WithMergeNoFastForward        = model.WithMergeNoFastForward
	WithMergeSquash               = model.WithMergeSquash
	WithMergeMessage              = model.WithMergeMessage
	WithMergeExtraArgs            = model.WithMergeExtraArgs
	WithRebaseInteractive         = model.WithRebaseInteractive
	WithRebaseAutosquash          = model.WithRebaseAutosquash
	WithRebaseExtraArgs           = model.WithRebaseExtraArgs
	WithCherryPickMainline        = model.WithCherryPickMainline
	WithCherryPickNoCommit        = model.WithCherryPickNoCommit
	WithCherryPickExtraArgs       = model.WithCherryPickExtraArgs
	WithCheckoutCreateBranch      = model.WithCheckoutCreateBranch
	WithCheckoutForce             = model.WithCheckoutForce
	WithCheckoutDetach            = model.WithCheckoutDetach
	WithCheckoutExtraArgs         = model.WithCheckoutExtraArgs
	WithCleanDirectories          = model.WithCleanDirectories
	WithCleanIgnored              = model.WithCleanIgnored
	WithCleanForce                = model.WithCleanForce
	WithCleanExtraArgs            = model.WithCleanExtraArgs
)

Functions

func ErrAlreadyExists

func ErrAlreadyExists(kind, name string) *errors.AppError

func ErrAmbiguousRef

func ErrAmbiguousRef(refname string) *errors.AppError

func ErrCheckedOutBranch

func ErrCheckedOutBranch(name string) *errors.AppError

func ErrConfigNotFound

func ErrConfigNotFound(key string) *errors.AppError

func ErrConflict

func ErrConflict(path string) *errors.AppError

func ErrDetachedHead

func ErrDetachedHead() *errors.AppError

func ErrEmbeddedUnsupported

func ErrEmbeddedUnsupported(operation string) *errors.AppError

func ErrFileTooLarge

func ErrFileTooLarge(path, revision string, size, limit int64) *errors.AppError

func ErrIdentityMissing

func ErrIdentityMissing(key string) *errors.AppError

func ErrInternal

func ErrInternal(cause error) *errors.AppError

func ErrInvalidConfigKey

func ErrInvalidConfigKey(key string) *errors.AppError

func ErrInvalidLineRange

func ErrInvalidLineRange(start, end int) *errors.AppError

func ErrInvalidPath

func ErrInvalidPath(path string) *errors.AppError

func ErrInvalidTransport

func ErrInvalidTransport(kind string) *errors.AppError

func ErrNetwork

func ErrNetwork(cause error) *errors.AppError

func ErrPushRejected

func ErrPushRejected(refname, reason string) *errors.AppError

func ErrRefNotFound

func ErrRefNotFound(refname string) *errors.AppError

func ErrRemoteAuth

func ErrRemoteAuth(message string) *errors.AppError

func ErrRemoteNotFound

func ErrRemoteNotFound(name string) *errors.AppError

func ErrRepoNotFound

func ErrRepoNotFound(path string) *errors.AppError

func ErrSigningKeyMissing

func ErrSigningKeyMissing(key string) *errors.AppError

func ErrSigningNotSupported

func ErrSigningNotSupported() *errors.AppError

Types

type BlameLine

type BlameLine = model.BlameLine

type BlameOption

type BlameOption = model.BlameOption

type BlameOptions

type BlameOptions = model.BlameOptions

type Blamer

type Blamer interface {
	// Blame returns line-level attribution for a file at a revision.
	Blame(revision, path string, opts ...BlameOption) ([]BlameLine, error)
}

Blamer provides per-line commit attribution.

type Branch

type Branch = model.Branch

type BranchFilter

type BranchFilter = model.BranchFilter

type Checker

type Checker interface {
	// Checkout updates HEAD, index, or paths to the requested target.
	Checkout(target string, paths ...string) error
}

Checker provides checkout operations.

type CheckoutOption

type CheckoutOption = model.CheckoutOption

type CheckoutOptions

type CheckoutOptions = model.CheckoutOptions

type CherryPickOption

type CherryPickOption = model.CherryPickOption

type CherryPickOptions

type CherryPickOptions = model.CherryPickOptions

type CherryPicker

type CherryPicker interface {
	// CherryPick applies the given revision onto the current HEAD.
	CherryPick(revision string) error
	// CherryPickContinue continues an in-progress cherry-pick.
	CherryPickContinue() error
	// CherryPickAbort aborts an in-progress cherry-pick.
	CherryPickAbort() error
}

CherryPicker provides cherry-pick operations.

type CleanOption

type CleanOption = model.CleanOption

type CleanOptions

type CleanOptions = model.CleanOptions

type Commit

type Commit = model.Commit

type CommitOption

type CommitOption = model.CommitOption

type CommitOptions

type CommitOptions = model.CommitOptions

type Committer

type Committer interface {
	// Commit creates a new commit from the current index state.
	Commit(message string, opts ...CommitOption) (Oid, error)
}

Committer provides commit creation.

type ConfigReader

type ConfigReader interface {
	// ConfigGet gets the last configured value for a key.
	ConfigGet(key string) (string, error)
	// ConfigGetAll gets all configured values for a key.
	ConfigGetAll(key string) ([]string, error)
	// ConfigSet sets a config key to a single value.
	ConfigSet(key, value string) error
}

ConfigReader provides git config access.

type DescribeOption

type DescribeOption = model.DescribeOption

type DescribeOptions

type DescribeOptions = model.DescribeOptions

type DiffEntry

type DiffEntry = model.DiffEntry

type DiffOption

type DiffOption = model.DiffOption

type DiffOptions

type DiffOptions = model.DiffOptions

type DiffStats

type DiffStats = model.DiffStats

type Differ

type Differ interface {
	// Diff returns file changes between two refs (branches, tags, or SHAs).
	Diff(from, to string) ([]DiffEntry, error)
	// DiffStats returns aggregated statistics for changes between two refs.
	DiffStats(from, to string) (DiffStats, error)
	// Status returns the working tree status (staged, unstaged, untracked files).
	Status() ([]StatusEntry, error)
}

Differ provides diff and working tree status operations.

type EntryKind

type EntryKind = model.EntryKind

type EntryState

type EntryState = model.EntryState

type Executor

type Executor interface {
	// Exec runs the git CLI with the provided arguments in the repository root.
	Exec(args ...string) ([]byte, error)
}

Executor provides a raw git command escape hatch.

type FetchOption

type FetchOption = model.FetchOption

type FetchOptions

type FetchOptions = model.FetchOptions

type FileStatus

type FileStatus = model.FileStatus

type GrepMatch

type GrepMatch = model.GrepMatch

type GrepOption

type GrepOption = model.GrepOption

type GrepOptions

type GrepOptions = model.GrepOptions

type IndexManager

type IndexManager interface {
	// Stage adds the provided paths to the repository index.
	Stage(paths ...string) error
	// Unstage removes paths from the index while preserving worktree changes.
	Unstage(paths ...string) error
	// StagedEntries returns staged files from the repository index.
	StagedEntries() ([]StatusEntry, error)
}

IndexManager provides staging area operations.

type Inspector

type Inspector interface {
	// Describe resolves a human-readable name for a revision.
	Describe(revision string) (string, error)
	// RevParse resolves a revision expression to an object ID.
	RevParse(spec string) (Oid, error)
	// Grep searches tracked content for pattern matches.
	Grep(pattern string, paths ...string) ([]GrepMatch, error)
	// Show returns raw object or file content for a revision expression.
	Show(spec string) ([]byte, error)
}

Inspector provides advanced read-only inspection helpers.

type LogOptions

type LogOptions = model.LogOptions

type LogReader

type LogReader interface {
	// Log returns commits matching the supplied traversal options.
	Log(opts LogOptions) ([]Commit, error)
	// MergeBase returns a merge base for a and b.
	MergeBase(a, b string) (Oid, error)
	// IsAncestor reports whether a is an ancestor of b.
	IsAncestor(a, b string) (bool, error)
}

LogReader provides commit log traversal.

type Maintainer

type Maintainer interface {
	// GC runs repository garbage collection.
	GC() error
	// Prune prunes unreachable repository data.
	Prune() error
	// Fsck verifies repository object integrity.
	Fsck() error
	// Clean lists or removes untracked files and returns their paths.
	// By default it performs a dry-run (equivalent to git clean -n);
	// no files are deleted unless WithCleanForce(true) is passed.
	Clean(opts ...CleanOption) ([]string, error)
}

Maintainer provides repository maintenance operations.

type MergeOption

type MergeOption = model.MergeOption

type MergeOptions

type MergeOptions = model.MergeOptions

type MergeResult

type MergeResult = model.MergeResult

type Merger

type Merger interface {
	// Merge merges the provided revision into the current HEAD.
	Merge(revision string) error
	// MergeAbort aborts an in-progress merge.
	MergeAbort() error
}

Merger provides merge operations.

type Oid

type Oid = model.Oid

type OpenOptions

type OpenOptions = model.OpenOptions

type Option

type Option = model.Option

type PushOption

type PushOption = model.PushOption

type PushOptions

type PushOptions = model.PushOptions

type RebaseOption

type RebaseOption = model.RebaseOption

type RebaseOptions

type RebaseOptions = model.RebaseOptions

type RebaseResult

type RebaseResult = model.RebaseResult

type Rebaser

type Rebaser interface {
	// Rebase rebases the current branch onto the provided revision.
	Rebase(onto string) error
	// RebaseContinue continues an in-progress rebase.
	RebaseContinue() error
	// RebaseAbort aborts an in-progress rebase.
	RebaseAbort() error
}

Rebaser provides rebase operations.

type RefManager

type RefManager interface {
	// ListBranches lists repository branches matching filter.
	ListBranches(filter BranchFilter) ([]Branch, error)
	// ListTags lists repository tags.
	ListTags() ([]Tag, error)
	// CreateBranch creates a local branch at target.
	CreateBranch(name, target string) error
	// DeleteBranch deletes a local branch.
	DeleteBranch(name string) error
	// CreateTag creates a lightweight or annotated tag at target.
	CreateTag(name, target, message string) error
	// CreateSignedTag creates a signed annotated tag at target using the git CLI.
	CreateSignedTag(name, target, message string, opts SignOptions) error
	// DeleteTag deletes a tag.
	DeleteTag(name string) error
}

RefManager provides branch and tag CRUD operations.

type Reference

type Reference = model.Reference

type Remote

type Remote = model.Remote

type RemoteManager

type RemoteManager interface {
	// ListRemotes lists configured remotes.
	ListRemotes() ([]Remote, error)
	// Fetch fetches updates from a remote. The context bounds the remote transfer.
	Fetch(ctx context.Context, remote string, opts ...FetchOption) error
	// Push pushes updates to a remote. The context bounds the remote transfer.
	Push(ctx context.Context, remote string, opts ...PushOption) error
	// TrackingBranch returns the configured upstream for a local branch.
	TrackingBranch(branch string) (string, error)
}

RemoteManager provides remote repository operations.

type Repo

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

Repo orchestrates git operations across the available backends. Operations are routed to whichever backend implements them: - embedded (go-git): Repository, Diff, TreeRead, Log, Blame, Index, Commit, Ref, Remote, Config - cli (git binary): Exec, Inspect, Merge, Rebase, CherryPick, Reset, Stash, Maintain When preferCLI is true and a future CLI implementation covers an embedded operation, the CLI backend will be preferred for that operation.

func Clone

func Clone(ctx context.Context, url, path string, opts ...Option) (*Repo, error)

Clone clones a repository into path. The context bounds the remote transfer.

func Discover

func Discover(path string, opts ...Option) (*Repo, error)

Discover finds a git repository by walking up from the given path.

func DiscoverWithAuth

func DiscoverWithAuth(path string, transport auth.Transport, opts ...Option) (*Repo, error)

DiscoverWithAuth finds a git repository with explicit transport authentication.

func Init

func Init(path string, opts ...Option) (*Repo, error)

Init creates a new git repository at the given path.

func InitBare

func InitBare(path string, opts ...Option) (*Repo, error)

InitBare creates a new bare git repository at the given path.

func Open

func Open(path string, opts ...Option) (*Repo, error)

Open opens a git repository at the given path.

func OpenWithAuth

func OpenWithAuth(path string, transport auth.Transport, opts ...Option) (*Repo, error)

OpenWithAuth opens a git repository with explicit transport authentication.

func (*Repo) Blame

func (r *Repo) Blame(revision, path string, opts ...BlameOption) ([]BlameLine, error)

func (*Repo) Checkout

func (r *Repo) Checkout(target string, paths ...string) error

func (*Repo) CherryPick

func (r *Repo) CherryPick(revision string) error

func (*Repo) CherryPickAbort

func (r *Repo) CherryPickAbort() error

func (*Repo) CherryPickContinue

func (r *Repo) CherryPickContinue() error

func (*Repo) Clean

func (r *Repo) Clean(opts ...CleanOption) ([]string, error)

func (*Repo) Commit

func (r *Repo) Commit(message string, opts ...CommitOption) (Oid, error)

func (*Repo) ConfigGet

func (r *Repo) ConfigGet(key string) (string, error)

func (*Repo) ConfigGetAll

func (r *Repo) ConfigGetAll(key string) ([]string, error)

func (*Repo) ConfigSet

func (r *Repo) ConfigSet(key, value string) error

func (*Repo) CreateBranch

func (r *Repo) CreateBranch(name, target string) error

func (*Repo) CreateSignedTag

func (r *Repo) CreateSignedTag(name, target, message string, opts SignOptions) error

func (*Repo) CreateTag

func (r *Repo) CreateTag(name, target, message string) error

func (*Repo) DeleteBranch

func (r *Repo) DeleteBranch(name string) error

func (*Repo) DeleteTag

func (r *Repo) DeleteTag(name string) error

func (*Repo) Describe

func (r *Repo) Describe(revision string) (string, error)

func (*Repo) Diff

func (r *Repo) Diff(from, to string) ([]DiffEntry, error)

func (*Repo) DiffStats

func (r *Repo) DiffStats(from, to string) (DiffStats, error)

func (*Repo) Exec

func (r *Repo) Exec(args ...string) ([]byte, error)

func (*Repo) Fetch

func (r *Repo) Fetch(ctx context.Context, remote string, opts ...FetchOption) error

func (*Repo) FileAt

func (r *Repo) FileAt(revision, path string) ([]byte, error)

func (*Repo) FileAtBounded

func (r *Repo) FileAtBounded(revision, path string, maxBytes int64) ([]byte, error)

func (*Repo) Fsck

func (r *Repo) Fsck() error

func (*Repo) GC

func (r *Repo) GC() error

func (*Repo) Grep

func (r *Repo) Grep(pattern string, paths ...string) ([]GrepMatch, error)

func (*Repo) Head

func (r *Repo) Head() (Reference, error)

func (*Repo) IsAncestor

func (r *Repo) IsAncestor(a, b string) (bool, error)

func (*Repo) IsDirty

func (r *Repo) IsDirty() (bool, error)

func (*Repo) ListBranches

func (r *Repo) ListBranches(filter BranchFilter) ([]Branch, error)

func (*Repo) ListEntries

func (r *Repo) ListEntries(revision, path string) ([]TreeEntry, error)

func (*Repo) ListRemotes

func (r *Repo) ListRemotes() ([]Remote, error)

func (*Repo) ListTags

func (r *Repo) ListTags() ([]Tag, error)

func (*Repo) Log

func (r *Repo) Log(opts LogOptions) ([]Commit, error)

func (*Repo) Merge

func (r *Repo) Merge(revision string) error

func (*Repo) MergeAbort

func (r *Repo) MergeAbort() error

func (*Repo) MergeBase

func (r *Repo) MergeBase(a, b string) (Oid, error)

func (*Repo) Prune

func (r *Repo) Prune() error

func (*Repo) Push

func (r *Repo) Push(ctx context.Context, remote string, opts ...PushOption) error

func (*Repo) Rebase

func (r *Repo) Rebase(onto string) error

func (*Repo) RebaseAbort

func (r *Repo) RebaseAbort() error

func (*Repo) RebaseContinue

func (r *Repo) RebaseContinue() error

func (*Repo) Reset

func (r *Repo) Reset(target string, mode ResetMode, paths ...string) error

func (*Repo) ResolveRef

func (r *Repo) ResolveRef(refname string) (Oid, error)

func (*Repo) RevParse

func (r *Repo) RevParse(spec string) (Oid, error)

func (*Repo) Root

func (r *Repo) Root() string

func (*Repo) Show

func (r *Repo) Show(spec string) ([]byte, error)

func (*Repo) Stage

func (r *Repo) Stage(paths ...string) error

func (*Repo) StagedEntries

func (r *Repo) StagedEntries() ([]StatusEntry, error)

func (*Repo) StashList

func (r *Repo) StashList() ([]StashEntry, error)

func (*Repo) StashPop

func (r *Repo) StashPop(index int) error

func (*Repo) StashPush

func (r *Repo) StashPush(message string) error

func (*Repo) Status

func (r *Repo) Status() ([]StatusEntry, error)

func (*Repo) TrackingBranch

func (r *Repo) TrackingBranch(branch string) (string, error)

func (*Repo) TreeHash

func (r *Repo) TreeHash(revision, path string) (TreeHash, error)

func (*Repo) Unstage

func (r *Repo) Unstage(paths ...string) error

type Repository

type Repository interface {
	// Root returns the absolute path to the repository root.
	Root() string
	// Head returns the reference that HEAD points to.
	Head() (Reference, error)
	// ResolveRef resolves a ref name (branch, tag, or SHA prefix) to an OID.
	ResolveRef(refname string) (Oid, error)
	// IsDirty reports whether the working tree has uncommitted changes.
	IsDirty() (bool, error)
}

Repository provides core git repository operations.

type ResetMode

type ResetMode = model.ResetMode

type Resetter

type Resetter interface {
	// Reset resets the repository to target using the requested mode.
	Reset(target string, mode ResetMode, paths ...string) error
}

Resetter provides reset operations.

type SignFormat

type SignFormat = model.SignFormat

type SignOptions

type SignOptions = model.SignOptions

type Signature

type Signature = model.Signature

type StashEntry

type StashEntry = model.StashEntry

type Stasher

type Stasher interface {
	// StashPush saves worktree and index state with an optional message.
	StashPush(message string) error
	// StashPop applies and drops the stash entry at index.
	StashPop(index int) error
	// StashList lists available stash entries.
	StashList() ([]StashEntry, error)
}

Stasher provides stash operations.

type StatusEntry

type StatusEntry = model.StatusEntry

type Tag

type Tag = model.Tag

type TreeEntry

type TreeEntry = model.TreeEntry

type TreeHash

type TreeHash = model.TreeHash

type TreeReader

type TreeReader interface {
	// TreeHash returns the OID of the tree at the given path and revision.
	TreeHash(revision, path string) (TreeHash, error)
	// FileAt returns the content of a file at the given revision and path.
	FileAt(revision, path string) ([]byte, error)
	// FileAtBounded returns file content only when the blob fits maxBytes.
	FileAtBounded(revision, path string, maxBytes int64) ([]byte, error)
	// ListEntries returns the entries in a tree at the given revision and path.
	ListEntries(revision, path string) ([]TreeEntry, error)
}

TreeReader provides read access to git tree objects.

Directories

Path Synopsis
Package auth defines transport and signing configuration shared by git backends.
Package auth defines transport and signing configuration shared by git backends.
Package cli provides a subprocess-backed git backend for operations that rely on native git command behavior, including exec, inspection, write, merge, reset, stash, and maintenance workflows.
Package cli provides a subprocess-backed git backend for operations that rely on native git command behavior, including exec, inspection, write, merge, reset, stash, and maintenance workflows.
Package embedded provides the pure-Go go-git backend for the git module.
Package embedded provides the pure-Go go-git backend for the git module.
internal
giterr
Package giterr defines the internal typed error values shared across the git packages.
Package giterr defines the internal typed error values shared across the git packages.
model
Package model defines the internal value types shared across the git packages.
Package model defines the internal value types shared across the git packages.
redact
Package redact masks sensitive material in git diagnostics so credentials never leak into error messages or logs.
Package redact masks sensitive material in git diagnostics so credentials never leak into error messages or logs.

Jump to

Keyboard shortcuts

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