git

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDefaultBranch = "main"
)

Variables

View Source
var (
	ErrNoUserID = errors.New("app user ID is not set")
)

Functions

func CloneRepo

func CloneRepo(gitURL string) (string, error)

CloneRepo clones a git repo to a temp directory

func CommitChanges

func CommitChanges(repoDir, message string) error

func GetDefaultBranch

func GetDefaultBranch(repoDir string) string

func GetOriginURL

func GetOriginURL() (string, error)

GetGitOriginURL returns url of `origin` remote of the current git repo

func PushBranch

func PushBranch(repoDir, branchName string) error

func RemoveRepo

func RemoveRepo(path string) error

func UpdateCommitter

func UpdateCommitter(gitURL, dirPath string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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