gitw

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	// contains filtered or unexported fields
}

Command implements methods with same interface than official git commands but over go-git.

func NewCommand

func NewCommand(fs afero.Fs, path string) (*Command, error)

NewCommand is a constructor for a gitw Command object, used to execute equivalents to git commands over a specific repository. Returns a Command struct

func (*Command) AddGlob

func (c *Command) AddGlob(pattern string) error

AddGlob executes a `git add` equivalent

func (*Command) CheckoutNewBranch

func (c *Command) CheckoutNewBranch(branch string) error

CheckoutNewBranch executes a `git checkout -b` equivalent

func (*Command) Clone

func (c *Command) Clone(repoURL string) error

Clone executes a `git clone` equivalent.

func (*Command) CloneBranch

func (c *Command) CloneBranch(repoURL string, branch string) error

CloneBranch executes a `git clone`, but obtaining only specified branch.

func (*Command) Commit

func (c *Command) Commit(msg string) error

Commit executes a `git commit -m` equivalent

func (*Command) Init

func (c *Command) Init() error

Init executes a `git init` equivalent

func (*Command) RemoteAdd

func (c *Command) RemoteAdd(name string, url string) error

RemoteAdd executes a `git remote add` equivalent

Jump to

Keyboard shortcuts

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