Help us shape the future of Go! Take the 2026 Go Developer Survey

git

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package git starts the git found in PATH, the one the user already runs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(dir string, args ...string) *exec.Cmd

Command prepares git with args in dir; every git deadvalues starts goes through here.

func Line added in v0.1.8

func Line(dir string, args ...string) string

Line is the output of git args in dir, trimmed and cached, or "" when git fails.

func Origin added in v0.1.8

func Origin(dir string) string

Origin is the URL of the origin remote of the checkout at dir, or "" without one.

func SameRepository added in v0.1.8

func SameRepository(a, b string) bool

SameRepository reports whether two git URLs name one repository, in https, ssh or scp form.

Types

This section is empty.

Jump to

Keyboard shortcuts

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