git

package
v0.20.5 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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
	Repo       string // The "url" to the repo, any format can be used as long as it's pushable
	FetchDepth int    // Limit fetching to the specified number of commits
	// contains filtered or unexported fields
}

Git is an implementation of git that executes git as a command This has drawbacks, but the big benefit is that the configuration probably already present can be reused

func (*Git) BranchExist added in v0.4.0

func (g *Git) BranchExist(branchName string) (bool, error)

BranchExist checks if the new branch exists

func (*Git) ChangeBranch added in v0.10.0

func (g *Git) ChangeBranch(branchName string) error

ChangeBranch changes the branch

func (*Git) Changes added in v0.3.0

func (g *Git) Changes() (bool, error)

Changes detect if any changes has been made in the directory

func (*Git) Clone

func (g *Git) Clone(baseName, headName string) error

Clone a repository

func (*Git) Commit

func (g *Git) Commit(commitAuthor *domain.CommitAuthor, commitMessage string) error

Commit and push all changes

func (*Git) Push added in v0.3.0

func (g *Git) Push() error

Push the committed changes to the remote

Jump to

Keyboard shortcuts

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