git

package
v0.0.0-...-626ac5e Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(files []string) error

Add ...

func AreUncommitedChanges

func AreUncommitedChanges() (bool, error)

AreUncommitedChanges ...

func CheckoutBranch

func CheckoutBranch(branch string) error

CheckoutBranch ...

func Commit

func Commit(message string) error

Commit ...

func CurrentBranchName

func CurrentBranchName() (string, error)

CurrentBranchName ...

func GetChangedFiles

func GetChangedFiles() ([]string, error)

GetChangedFiles ...

func LocalBranches

func LocalBranches() ([]string, error)

LocalBranches ...

func Merge

func Merge(branch, commitMessage string) error

Merge ...

func SortByDate

func SortByDate(commits []CommitModel)

SortByDate ...

func Strip

func Strip(str string) string

Strip ...

func Tag

func Tag(version string) error

Tag ...

Types

type CommitModel

type CommitModel struct {
	Hash    string
	Message string
	Date    time.Time
	Author  string
	Tag     string
}

CommitModel ...

func CommitOfTag

func CommitOfTag(tag string) (CommitModel, error)

CommitOfTag ...

func FirstCommit

func FirstCommit() (CommitModel, error)

FirstCommit ...

func GetCommitsFrom

func GetCommitsFrom(startCommitPtr *CommitModel) ([]CommitModel, error)

GetCommitsFrom ...

func LatestCommit

func LatestCommit() (CommitModel, error)

LatestCommit ...

func VersionTaggedCommits

func VersionTaggedCommits() ([]CommitModel, error)

VersionTaggedCommits ...

type PrintableCommand

type PrintableCommand struct {
	RawCommand string
	Name       string
	Args       []string
}

PrintableCommand ...

func NewPrintableCommand

func NewPrintableCommand(commandParts ...string) PrintableCommand

NewPrintableCommand ...

func (PrintableCommand) Run

func (printableCommand PrintableCommand) Run() (string, error)

Run ...

Jump to

Keyboard shortcuts

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