git

package
v0.2.22 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckoutBranch

func CheckoutBranch(path string, branch string) error

CheckoutBranch checks out a branch in the repository

func FetchOrigin

func FetchOrigin(path string) error

FetchOrigin fetches updates from the remote origin

func GetCurrentBranch

func GetCurrentBranch(path string) (string, error)

GetCurrentBranch returns the current branch name

func GetRemoteURL

func GetRemoteURL(path string) (string, error)

GetRemoteURL returns the URL of the remote origin

func IsGitRepo

func IsGitRepo(path string) bool

IsGitRepo checks if the current directory is a Git repository

func ResetHard

func ResetHard(path string, target string) error

ResetHard performs a hard reset to the specified commit/branch

func ValidateBranchTarget

func ValidateBranchTarget(branch string) error

ValidateBranchTarget validates that a branch name is allowed for reset operations.

Types

This section is empty.

Jump to

Keyboard shortcuts

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