git

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package git provides utilities to interact with git repositories.

This package is primarily designed to clone and pull updates from git repositories, specifically with support for optional credentials in the form of username and password from environment variables.

Author: zakaria.elbouwab zcubbs https://github.com/zcubbs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneRepository added in v0.1.15

func CloneRepository(repoURL, destination string, auth *gitHttp.BasicAuth) error

CloneRepository clones a Git repository into a given directory with optional authentication.

func FileHasChanges

func FileHasChanges(repoPath, file, lastCommit, currentCommit string) (bool, error)

func GetLatestCommit

func GetLatestCommit(gitRepoPath string) (string, error)

func PullRepository added in v0.1.15

func PullRepository(repoPath string, auth *gitHttp.BasicAuth) (bool, error)

PullRepository updates the local copy of a Git repository with optional authentication and returns true if there were changes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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