gitwrap

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ProgressOutout control git command output
	ProgressOutout sideband.Progress = ioutil.Discard
)

Functions

func CloneOrOpen

func CloneOrOpen(repoURL, destFolder string, auth *http.BasicAuth) (repo *git.Repository, err error)

CloneOrOpen - shortcut to cloning a repo or opening an existing one

func CommitAndPush

func CommitAndPush(repo *git.Repository, name, email, message string, date time.Time, auth *http.BasicAuth) (hash string, err error)

CommitAndPush - shortcut for commit and push name, email, date are for the user creating the commit singnature message is the commit message auth is for authentication to the remote for the pull

func CreateBranch

func CreateBranch(repo *git.Repository, branchName string) (err error)

CreateBranch - create a new branch

func GetGlobalGitIdentity

func GetGlobalGitIdentity() (user, email string)

GetGlobalGitIdentity - attempt to read git identity from global config

func PullBranch

func PullBranch(repo *git.Repository, branchName string) (err error)

PullBranch - checkout + fetch + merge an existing branch

func StageToCommit

func StageToCommit(repo *git.Repository, path ...string) (err error)

StageToCommit - stage paths to be committed

Types

This section is empty.

Jump to

Keyboard shortcuts

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