git

package
v1.1.1-0...-9418116 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct {
	LocalPath string
	RemoteURL string
}

Repository holds the information about a repository

func NewGitRepository

func NewGitRepository(localPath string, remoteURL string) *Repository

NewGitRepository creates a new git repository struct with the given parameters

func (*Repository) Checkout

func (gr *Repository) Checkout(tag, branch, revision string) error

Checkout certain tag, branch or hash

func (*Repository) GetHash

func (gr *Repository) GetHash() (string, error)

GetHash retrieves the current HEADs hash

func (*Repository) GetRemote

func (gr *Repository) GetRemote() (string, error)

GetRemote retrieves the remote origin

func (*Repository) Update

func (gr *Repository) Update(merge bool) error

Update pulls the repository or clones it into the local path

Jump to

Keyboard shortcuts

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