git

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUncommittedChanges = errors.New("uncommitted changes exist in the repository")

Functions

func AddOrCreateBranchToWorkSpace

func AddOrCreateBranchToWorkSpace(repoDir string, targetPath string, branchName string, baseBranchName string) ([]byte, error)

func BranchExist

func BranchExist(branchName string, repoDir string) bool

func CheckUncommittedChanges

func CheckUncommittedChanges(repoDir string) error

CheckUncommittedChanges returns ErrUncommittedChanges if there are uncommitted changes

func FetchBranch

func FetchBranch(repoDir, branchName string) ([]byte, error)

FetchBranch updates a local branch from origin without checking it out

func GetCurrentBranch

func GetCurrentBranch(repoDir string) (string, error)

GetCurrentBranch returns the name of the currently checked out branch

func GetDefaultBranch

func GetDefaultBranch(repoDir string) (string, error)

GetDefaultBranch returns the default branch name of the remote origin (e.g., master or main)

func PullFastForward

func PullFastForward(repoDir, branchName string) ([]byte, error)

PullFastForward updates the current branch using fast-forward only

func RemoveFromWorkSpace

func RemoveFromWorkSpace(repoDir string, targetPath string, force bool) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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