git

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(dir string, path string) error

func Branch

func Branch(dir string, branch string) error

func CheckoutBranch

func CheckoutBranch(dir string, branch string, gitConfig manifest.GitConfig) error

func Clone

func Clone(gitConfig manifest.GitConfig) (string, error)

Clone clones a git repository into a temporary directory and returns the directory path

func CloneInto

func CloneInto(gitConfig manifest.GitConfig, dir string) error

CloneInto clones a git repository into the specified directory

func Commit

func Commit(dir string, message string, author manifest.Author) error

func GetAuthMethod added in v0.4.0

func GetAuthMethod(gitConfig manifest.GitConfig) (transport.AuthMethod, error)

GetAuthMethod returns an ssh.AuthMethod based on the git config, or nil if no auth is specified

func GetRemoteFile

func GetRemoteFile(gitConfig manifest.GitConfig, branch, path string) ([]byte, error)

func IsClean

func IsClean(dir string) (bool, error)

func Push

func Push(dir string, gitConfig manifest.GitConfig) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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