git

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Git

type Git struct{}

func (*Git) Add

func (g *Git) Add(workingDir string, args ...string) error

Add runs 'git add' with the given args.

func (*Git) AddWorktree

func (g *Git) AddWorktree(workingDir string, commitIsh string) (string, error)

AddWorktree creates a new Git worktree with a detached HEAD for the given commit-ish and returns its path.

func (*Git) Commit

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

Commit runs 'git commit' with the given message. the commit is signed off.

func (*Git) GetPushURL added in v1.2.1

func (g *Git) GetPushURL(remote string, token string) (string, error)

GetPushURL returns the push url with a token inserted

func (*Git) Pull added in v1.6.0

func (g *Git) Pull(workingDir string, args ...string) error

UpdateBranch runs 'git pull' with the given args.

func (*Git) Push

func (g *Git) Push(workingDir string, args ...string) error

Push runs 'git push' with the given args.

func (*Git) RemoveWorktree

func (g *Git) RemoveWorktree(workingDir string, path string) error

RemoveWorktree removes the Git worktree with the given path.

Jump to

Keyboard shortcuts

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