Documentation
¶
Index ¶
- Variables
- func CloneOrOpen(repoURL, destFolder string, auth *http.BasicAuth) (repo *git.Repository, err error)
- func CommitAndPush(repo *git.Repository, name, email, message string, date time.Time, ...) (hash string, err error)
- func CreateBranch(repo *git.Repository, branchName string) (err error)
- func GetGlobalGitIdentity() (user, email string)
- func PullBranch(repo *git.Repository, branchName string) (err error)
- func StageToCommit(repo *git.Repository, path ...string) (err error)
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 ¶
CreateBranch - create a new branch
func GetGlobalGitIdentity ¶
func GetGlobalGitIdentity() (user, email string)
GetGlobalGitIdentity - attempt to read git identity from global config
func PullBranch ¶
PullBranch - checkout + fetch + merge an existing branch
func StageToCommit ¶
StageToCommit - stage paths to be committed
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.