git

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2020 License: MIT Imports: 8 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
	NewBranch string // The name of the new branch that new changes will be pushed to

	CommitAuthor *domain.CommitAuthor // The author data is used when making commits, if the field is not set, the git configuration will be used
	// 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() (bool, error)

BranchExist checks if the new branch exists

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() error

Clone a repository

func (*Git) Commit

func (g *Git) Commit(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