git

package
v0.0.0-...-a4ee06b Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2017 License: MIT Imports: 6 Imported by: 1

Documentation

Overview

Package git provides basic git client functionality

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Checkout

func Checkout(repositoryPath, gitRef string) error

Checks out a given git ref inside repository path

func Clone

func Clone(repositoryUrl string) (string, error)

Clone executes a git clone command on the system. It returns the path to the repository on the system.

func Config

func Config(repositoryPath, configKey, configValue string) error

func Exists

func Exists(repositoryPath string) bool

func Fetch

func Fetch(repositoryPath string) error

Calls git fetch inside repository path

func GenerateCloneURL

func GenerateCloneURL(repositoryFullName string) string

func GetEmail

func GetEmail() string

func GetName

func GetName() string

func GetRepositoryFilePath

func GetRepositoryFilePath(name string) string

func Prune

func Prune(repositoryPath string) error

Light wrapper around os/exec.Command + logging

func Push

func Push(repositoryPath, branch string) error

Pushes branch back to origin

func Rebase

func Rebase(repositoryPath, baseBranch string) error

Rebases branch with baseBranch inside repository path

func Reset

func Reset(repositoryPath, branch string) error

Does hard reset inside repository path

Types

type Output

type Output struct {
	Buffer string
}

func (*Output) String

func (o *Output) String() string

func (*Output) Write

func (w *Output) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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