git

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package git provides Git operation wrappers for cloning and updating repositories.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clone

func Clone(url, dest string, depth int) error

Clone clones a git repository from url to dest with the specified depth. Output is streamed to os.Stdout and os.Stderr. Stdin is connected to os.Stdin to support interactive authentication (e.g., SSH passphrase, credentials).

func IsURL

func IsURL(s string) bool

IsURL returns true if s looks like a git repository URL. It checks for:

  • URLs containing "://" (e.g., https://, git://)
  • URLs ending with ".git"
  • SSH-style URLs starting with "git@"

func Pull

func Pull(repoPath string) error

Pull performs a fast-forward-only pull in the specified repository directory. Output is streamed to os.Stdout and os.Stderr. Stdin is connected to os.Stdin to support interactive authentication (e.g., SSH passphrase, credentials).

func ValidateRemote

func ValidateRemote(repoPath string) error

ValidateRemote checks if repoPath is a valid git repository by verifying the existence of a .git directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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