git

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Branch(branchName string) error
	CheckoutBranch(branchName string) error
	Pull() error
	Status() (string, error)
	IsClean() (bool, error)
	Add(filename string) error
	Commit(message string) error
	Push() error
	UploadAllChanges(message string) (err error)
}

func NewClient

func NewClient(sshKnownHostsPath, sshKeyPath, sshKeyPassword, url, absolutePath string) (Client, error)

NewClient creates a new Git Client with an SSH key, the repository URL and an absolute path where to read/write the repository. SSH was chosen as it is available on all Git servers (Github, Gitea, Gitlab, etc.)

Jump to

Keyboard shortcuts

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