git

package
v0.0.0-...-30e13b2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package git provides git-releated helper functions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ancestor

func Ancestor() string

Ancestor - Returns the ancestor of HEAD

func Branch

func Branch() string

Branch - Returns the current HEAD alias

func CanonicalBranch

func CanonicalBranch() string

CanonicalBranch - Returns the canonical git remote

func CanonicalRemote

func CanonicalRemote() string

CanonicalRemote - Returns the canonical git remote

func Checkout

func Checkout(branch string) bool

Checkout - Checks out the specified branch

func Create

func Create(branch string) bool

Create - Creates the specified branch

func Delete

func Delete(branch string) bool

Delete - Deletes the specified branch

func IsRepo

func IsRepo() bool

IsRepo - Returns true if currently in a git repository

func RemoteBranches

func RemoteBranches() []string

RemoteBranches - Returns a slice of the current remote branches

func RemoteHasBranch

func RemoteHasBranch(remote string, branch string) bool

RemoteHasBranch - Returns true if specified remote contains the specified branch

func Remotes

func Remotes() []string

Remotes - Returns the configured remotes

func ResetHard

func ResetHard(address string)

ResetHard - Hard resets to the specified address

func Status

func Status() string

Status - Returns the current status

Types

This section is empty.

Jump to

Keyboard shortcuts

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