repository

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckoutBranch

func CheckoutBranch(repo *git.Repository, branch string) error

CheckoutBranch checks out the branch provided in the given repository or returns an error

func CommitAll

func CommitAll(repo *git.Repository, commitMessage string) error

CommitAll commits all changes, whether or not they have been staged, and creates a commit

func CreateBranch

func CreateBranch(repo *git.Repository, branch string, hash plumbing.Hash) error

CreateBranch creates a new branch within the given repository or returns an error

func CreateInitialCommit

func CreateInitialCommit(repo *git.Repository) error

CreateInitialCommit creates an initial commit for a Github repository at the repoPath provided

func CreateRepo

func CreateRepo(repoPath string) (*git.Repository, error)

CreateRepo returns a newly generated GitRepository at the path provided

func DeleteBranch

func DeleteBranch(repo *git.Repository, branch string) error

DeleteBranch deletes a branch within a given repository or returns an error

func GetCurrentBranch

func GetCurrentBranch(repo *git.Repository) (string, error)

GetCurrentBranch gets the current branch of the repositry or returns an error

func GetCurrentBranchRefName

func GetCurrentBranchRefName(repo *git.Repository) (plumbing.ReferenceName, error)

GetCurrentBranchRefName gets the current branch of the repositry or returns an error

func GetHead

func GetHead(repo *git.Repository) (plumbing.Hash, error)

GetHead returns the HEAD hash of the current branch

func GetLocalBranchRefName

func GetLocalBranchRefName(branch string) plumbing.ReferenceName

GetLocalBranchRefName returns the reference name of a given local branch

func GetRemoteBranchRefName

func GetRemoteBranchRefName(branch, remote string) plumbing.ReferenceName

GetRemoteBranchRefName returns the reference name of a given remote branch

func GetRepo

func GetRepo(repoPath string) (*git.Repository, error)

GetRepo returns an existing GitRepository at the path provided

func GetRepoPath

func GetRepoPath(repo *git.Repository) (string, error)

GetRepoPath returns the path to the repo in the local filesystem

Types

This section is empty.

Jump to

Keyboard shortcuts

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