git

package
v1.154.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeBranch

func ChangeBranch(branchName string, worktree *git.Worktree) error

ChangeBranch checkout the provided branch. It will create a new branch if the branch does not exist yet. It will return an error if no branch name if provided

func CommitSingleFile

func CommitSingleFile(filePath, commitMessage, author string, worktree *git.Worktree) (plumbing.Hash, error)

CommitSingleFile Commits the file located in the relative file path with the commitMessage to the given worktree. In case of errors, the error is returned. In the successful case the commit is provided.

func LogRange added in v1.123.0

func LogRange(repo *git.Repository, from, to string) (object.CommitIter, error)

LogRange Returns a CommitIterator providing all commits reachable from 'to', but not reachable by 'from'.

func PlainClone

func PlainClone(username, password, serverURL, directory string) (*git.Repository, error)

PlainClone Clones a non-bare repository to the provided directory

func PlainOpen added in v1.126.0

func PlainOpen(path string) (*git.Repository, error)

PlainOpen opens a git repository from the given path

func PushChangesToRepository

func PushChangesToRepository(username, password string, repository *git.Repository) error

PushChangesToRepository Pushes all committed changes in the repository to the remote repository

Types

This section is empty.

Jump to

Keyboard shortcuts

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