git

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: Apache-2.0 Imports: 5 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 {
	*cmd.Command
	// contains filtered or unexported fields
}

Git wraps the git command line.

func NewGit added in v1.2.0

func NewGit(path, authorName, authorEmail string) (*Git, error)

NewGit returns a new Git or an error.

func (*Git) CheckoutBranch added in v1.2.0

func (g *Git) CheckoutBranch(branchName string) (string, error)

Checkout branch.

func (*Git) Commit

func (g *Git) Commit(message string) (string, error)

Commit adds and commits all changes.

func (*Git) CreateAndCheckoutBranch added in v1.2.0

func (g *Git) CreateAndCheckoutBranch(branchName string) (string, error)

CreateAndCheckoutBranch does what it says.

func (*Git) Diff

func (g *Git) Diff() (string, error)

Diff shows the changes.

func (*Git) GetGlobalUserEmail added in v1.2.0

func (g *Git) GetGlobalUserEmail() (string, error)

GetGlobalUserEmail returns user email from gits global config.

func (*Git) GetGlobalUserName added in v1.2.0

func (g *Git) GetGlobalUserName() (string, error)

GetGlobalUserName returns user name from gits global config.

func (*Git) GetRemoteURL

func (g *Git) GetRemoteURL() (string, error)

GetRemoteURL returns the remotes URL or an error.

func (*Git) PullRebase

func (g *Git) PullRebase() (string, error)

PullRebase pulls and rebases.

func (*Git) Push added in v1.2.0

func (g *Git) Push(branchName string) (string, error)

Push pushes to the given upstream branch.

func (*Git) RebaseAndPushToMaster

func (g *Git) RebaseAndPushToMaster() (string, error)

PushToMaster rebases and pushes the commit(s) to upstream.

type Hub added in v1.2.0

type Hub struct {
	*cmd.Command
	// contains filtered or unexported fields
}

Hub used for interacting with the github.com API.

func NewHub added in v1.2.0

func NewHub(path string) (*Hub, error)

NewHub returns a new Hub or an error.

func (*Hub) OpenPullRequestToMaster added in v1.2.0

func (h *Hub) OpenPullRequestToMaster(fromBranch, title, description string) (string, error)

OpenPullRequestToMaster opens a new pull request on github.com to master branch.

Jump to

Keyboard shortcuts

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