git

package
v0.0.0-...-8ae6469 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clone

func Clone(dir string, opts CloneOptions) error

Clone clones a git Repository with the given options

Types

type CloneOptions

type CloneOptions git.CloneOptions

CloneOptions are used when cloning a git Repository

type Config

type Config struct {
	User struct {
		Name  string `ini:"name"`
		Email string `ini:"email"`
	} `ini:"user"`
}

func OpenGitConfig

func OpenGitConfig() (c Config, err error)

type Repository

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

func Initiate

func Initiate(dir string) (Repository, error)

Initiate starts a new git Repository with the given options

func (*Repository) Commit

func (r *Repository) Commit(msg, addPattern, author, email string) (err error)

Commit mark a commit on the current Repository

func (*Repository) RenameBranch

func (r *Repository) RenameBranch() error

RenameBranch Change the default branch on the current Repository to use "main"

func (*Repository) SetRemote

func (r *Repository) SetRemote(remoteAddr string) (err error)

SetRemote defines a new remote for the Repository

Jump to

Keyboard shortcuts

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