git

package
v0.0.0-...-91ebc00 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(worktree *git.Worktree, paths []string) error

Add adds the given paths to the Git index.

func Checkout

func Checkout(worktree *git.Worktree, branch string, create bool) error

Checkout checks out the working tree at the given branch, creating a new branch if necessary.

func CloneRepo

func CloneRepo(cloneURL, destination, headRepoOwner, branch string) (*git.Repository, string, error)

CloneRepo clones the remote repository to a destination folder and creates a Git remote.

func Commit

func Commit(worktree *git.Worktree, commitMessage string) error

Commit creates a new commit with the given commit message.

func Push

func Push(repo *git.Repository, headRepoOwner, branch, githubToken string) error

Push pushes changes to the given remote branch on GitHub.

func ResetToHEAD

func ResetToHEAD(worktree *git.Worktree, baseRepoHeadCommit string) error

ResetToHEAD hard-resets the current working tree to point to the HEAD commit of the base repository.

Types

This section is empty.

Jump to

Keyboard shortcuts

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