gitutil

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyDiffs added in v0.20.0

func ApplyDiffs(diffs []run.DiffResult)

func CheckForChangesNotOnRemote added in v0.20.0

func CheckForChangesNotOnRemote() (bool, error)

func DetectProvider added in v0.26.0

func DetectProvider(remoteUrl string) string

DetectProvider returns the git hosting provider inferred from the remote URL. Supported values: "github", "gitlab", "azuredevops", "bitbucket", or "" for unknown.

func EnsureGitignore

func EnsureGitignore(appendStr string) error

func GetCurrentBranch added in v0.19.0

func GetCurrentBranch() (string, error)

func GetCurrentTag added in v0.26.0

func GetCurrentTag() (string, error)

func GetLastCommitHash added in v0.16.0

func GetLastCommitHash() (string, error)

func GetRemoteUrl added in v0.26.0

func GetRemoteUrl() (string, error)

func ParseRepoBaseUrl added in v0.26.0

func ParseRepoBaseUrl(remoteUrl string) (string, error)

ParseRepoBaseUrl converts a git remote URL (SSH or HTTP/HTTPS) into a browsable base URL. SSH remotes are converted to HTTPS; HTTP/HTTPS remotes preserve their original scheme. Supports GitHub, GitLab, Azure DevOps, and Bitbucket.

Types

This section is empty.

Jump to

Keyboard shortcuts

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