git

package
v3.0.0-alpha2.105 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotInstalled = errors.New("git is not installed; please install git from https://git-scm.com")

ErrNotInstalled is returned when git is not found in PATH.

Functions

func AddAll

func AddAll(dir string) error

AddAll stages all files in the repository at dir.

func Clone

func Clone(url, dir, tag string) error

Clone clones url into dir. If tag is non-empty, checks out that tag or branch.

func HeadHash

func HeadHash(dir string) (string, error)

HeadHash returns the short (8-character) commit hash of HEAD in dir.

func Init

func Init(dir string) error

Init initializes a new git repository at dir.

func RemoteAdd

func RemoteAdd(dir, name, url string) error

RemoteAdd adds a named remote to the repository at dir.

Types

This section is empty.

Jump to

Keyboard shortcuts

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