Documentation
¶
Index ¶
- type Git
- func (g *Git) AddRemote(name, url string) error
- func (g *Git) BranchExist(remoteName, branchName string) (bool, error)
- func (g *Git) ChangeBranch(branchName string) error
- func (g *Git) Changes() (bool, error)
- func (g *Git) ChangesSinceCommit(sinceCommitHash string) ([]git.Changes, error)
- func (g *Git) Clone(ctx context.Context, url string, baseName string) error
- func (g *Git) Commit(commitAuthor *git.CommitAuthor, commitMessage string) error
- func (g *Git) LatestCommitHash() (string, error)
- func (g *Git) Push(ctx context.Context, remoteName, remoteReference string, force bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Git ¶
type Git struct {
Directory string // The (temporary) directory that should be worked within
FetchDepth int // Limit fetching to the specified number of commits
}
Git is an implementation of git that executes git as commands
func (*Git) BranchExist ¶
BranchExist checks if the new branch exists
func (*Git) ChangeBranch ¶
ChangeBranch changes the branch
func (*Git) ChangesSinceCommit ¶ added in v0.61.0
ChangesSinceCommit returns the changes made in commits since the given commit hash
func (*Git) Commit ¶
func (g *Git) Commit(commitAuthor *git.CommitAuthor, commitMessage string) error
Commit and push all changes
func (*Git) LatestCommitHash ¶ added in v0.61.0
LatestCommitHash returns the latest commit hash
Click to show internal directories.
Click to hide internal directories.