gitw

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentRef

func CurrentRef(path string) (string, error)

CurrentRef returns the current reference or branch name, with the Git directory specified by path

git -C path rev-parse --abbrev-ref HEAD

func GitDir

func GitDir(path string) (string, error)

GitDir checks if the directory is a Git repository, with the Git directory specified by path

git -C path rev-parse --git-dir

func RemoteURL

func RemoteURL(path string) (string, error)

RemoteURL returns the URL of the remote, with the Git directory specified by path

git -C path ls-remote --get-url

Types

This section is empty.

Jump to

Keyboard shortcuts

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