Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Origin represents the constant for 'origin' remote Origin = "origin" // Master is the constant for master branch Master = "master" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct {
// RepositoryRoot represents the root of the git repository after cloning
RepositoryRoot string
// GitPath represents the path to the git executable
GitPath string
}
Info represents the repository information
type Repository ¶
type Repository interface {
Validate() error
// GetInfo retrieves the information of this git repository like path, indices etc.
GetInfo() *Info
// Checkout checks out a branch in the git repository
Checkout(branchName string) error
// CreateAndCheckout creates and checks out a branch
CreateAndCheckout(branchName string) error
// ListRemoteBranches lists all the remote branches with the given remote name
ListRemoteBranches(remoteName string) ([]string, error)
// PushAndSetUpstream pushes and sets up the upstream branch from the current branch
PushAndSetUpstream(remoteName string, branchName string) error
}
Repository represents a git repository
Click to show internal directories.
Click to hide internal directories.