Documentation ¶
Index ¶
- func CheckoutBranch(repo *git.Repository, branch string) error
- func CommitAll(repo *git.Repository, commitMessage string) error
- func CreateBranch(repo *git.Repository, branch string, hash plumbing.Hash) error
- func CreateInitialCommit(repo *git.Repository) error
- func CreateRepo(repoPath string) (*git.Repository, error)
- func DeleteBranch(repo *git.Repository, branch string) error
- func GetCurrentBranch(repo *git.Repository) (string, error)
- func GetCurrentBranchRefName(repo *git.Repository) (plumbing.ReferenceName, error)
- func GetHead(repo *git.Repository) (plumbing.Hash, error)
- func GetLocalBranchRefName(branch string) plumbing.ReferenceName
- func GetRemoteBranchRefName(branch, remote string) plumbing.ReferenceName
- func GetRepo(repoPath string) (*git.Repository, error)
- func GetRepoPath(repo *git.Repository) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckoutBranch ¶
CheckoutBranch checks out the branch provided in the given repository or returns an error
func CommitAll ¶
CommitAll commits all changes, whether or not they have been staged, and creates a commit
func CreateBranch ¶
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 ¶
CreateRepo returns a newly generated GitRepository at the path provided
func DeleteBranch ¶
DeleteBranch deletes a branch within a given repository or returns an error
func GetCurrentBranch ¶
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 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 GetRepoPath ¶
GetRepoPath returns the path to the repo in the local filesystem
Types ¶
This section is empty.