gitgeneric

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(files []string, workingDir string) error

Add run `git add`.

func Checkout

func Checkout(branch, remoteBranch, workingDir string) error

Checkout create and then uses a temporary git branch.

func Clone

func Clone(username, password, URL, workingDir string) error

Clone run `git clone`.

func Commit

func Commit(user, email, message, workingDir string) error

Commit run `git commit`.

func GetChangedFiles

func GetChangedFiles(workingDir string) ([]string, error)

func IsSimilarBranch

func IsSimilarBranch(a, b, workingDir string) (bool, error)

IsSimilarBranch checks that the last commits of the two branches are similar then return true if it's the case

func NewTag

func NewTag(tag, message, workingDir string) (bool, error)

NewTag create a tag then return a boolean to indicate if the tag was created or not.

func Push

func Push(username string, password string, workingDir string, force bool) error

Push run `git push`.

func PushTag

func PushTag(tag string, username string, password string, workingDir string, force bool) error

PushTag publish a single tag created locally

func SanitizeBranchName

func SanitizeBranchName(branch string) string

SanitizeBranchName replace wrong character in the branch name

func Tags

func Tags(workingDir string) (tags []string, err error)

Tags return a list of git tags ordered by creation time

Types

This section is empty.

Jump to

Keyboard shortcuts

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