git

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildRemoteURL

func BuildRemoteURL(host, org, repo string) string

BuildRemoteURL builds a Git remote URL from components

func GetRemoteURL

func GetRemoteURL(repoPath string) (string, error)

GetRemoteURL gets the origin remote URL for a repository

func GetUserEmail

func GetUserEmail(repoPath string) (string, error)

GetUserEmail gets the user.email config for a repository

func GetUserName

func GetUserName(repoPath string) (string, error)

GetUserName gets the user.name config for a repository

func IsRepo

func IsRepo(path string) bool

IsRepo checks if a path is a Git repository

func ParseRemoteURL

func ParseRemoteURL(url string) (host, org, repo string, err error)

ParseRemoteURL parses a Git remote URL and extracts the host and path

func SetRemoteURL

func SetRemoteURL(repoPath, url string) error

SetRemoteURL sets the origin remote URL for a repository

func SetUserEmail

func SetUserEmail(repoPath, email string) error

SetUserEmail sets the user.email config for a repository

func SetUserName

func SetUserName(repoPath, name string) error

SetUserName sets the user.name config for a repository

Types

This section is empty.

Jump to

Keyboard shortcuts

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