Documentation ¶
Index ¶
- type ExternalGit
- func (g *ExternalGit) Add(path string) error
- func (g *ExternalGit) AddAll() error
- func (g *ExternalGit) Checkout(branchName string, create bool) error
- func (g *ExternalGit) CloneOverHttp(url string, username string, password string) error
- func (g *ExternalGit) Commit(message string) (string, error)
- func (g *ExternalGit) Exec(arg ...string) (string, error)
- func (g *ExternalGit) GetFilePath(filePath string) string
- func (g *ExternalGit) GetRepositoryPath() string
- func (g *ExternalGit) HasChanges() (bool, error)
- func (g *ExternalGit) Push(force bool) error
- func (g *ExternalGit) SetConfig(key string, value string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExternalGit ¶
type ExternalGit struct {
// contains filtered or unexported fields
}
func NewClonedGit ¶
func NewClonedGit(remoteUrl string, remoteUsername string, remotePassword string, gitEmail string, gitUsername string) (*ExternalGit, error)
NewClonedGit creates a new ExternalGit from a clone
func (*ExternalGit) Checkout ¶
func (g *ExternalGit) Checkout(branchName string, create bool) error
Checkout checks out a branch
func (*ExternalGit) CloneOverHttp ¶
func (g *ExternalGit) CloneOverHttp(url string, username string, password string) error
CloneOverHttp clones a Git repository using HTTP(S)
func (*ExternalGit) Commit ¶
func (g *ExternalGit) Commit(message string) (string, error)
Commit commits all staged changes
func (*ExternalGit) Exec ¶
func (g *ExternalGit) Exec(arg ...string) (string, error)
Exec executes git commands in the context of the repository
func (*ExternalGit) GetFilePath ¶
func (g *ExternalGit) GetFilePath(filePath string) string
GetFilePath returns the absolute path to a file in the repository
func (*ExternalGit) GetRepositoryPath ¶
func (g *ExternalGit) GetRepositoryPath() string
GetRepositoryPath returns the absolute path to the repository
func (*ExternalGit) HasChanges ¶
func (g *ExternalGit) HasChanges() (bool, error)
HasChanges checks for changes in the current branch
func (*ExternalGit) Push ¶
func (g *ExternalGit) Push(force bool) error
Push pushes the current branch to the "origin" remote
Click to show internal directories.
Click to hide internal directories.