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: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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