Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCurrentBranch ¶
GetCurrentBranch returns the current git branch name for the given directory. If it fails to get the branch name, it returns an empty string.
func GetRemoteURL ¶
GetRemoteURL returns the git remote URL for the given directory. It defaults to the "origin" remote. If it fails to get the URL, it returns an empty string.
func GetRepoRoot ¶
GetRepoRoot returns the absolute path to the git repository root for the given path. The input can be either a file or a directory within the repository. If the path is not inside a git repository or an error occurs, it returns an empty string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.