Documentation
¶
Index ¶
- func CreateAnnotatedTag(repoPath, tagName, message string) error
- func CreateAnnotatedTags(repoPath string, tags map[string]string) error
- func CreateCommit(repoPath, message string) error
- func CreateLightweightTag(repoPath, tagName string) error
- func CreateLightweightTags(repoPath string, tagNames []string) error
- func DeleteTags(repoPath string, tagNames []string) error
- func EnsureTagsAbsent(repoPath string, tagNames []string) error
- func FindRepositoryRoot(path string) (string, error)
- func HeadHash(repoPath string) (plumbing.Hash, error)
- func IsRepository(path string) (bool, error)
- func ResetHard(repoPath string, hash plumbing.Hash) error
- func ResetMixed(repoPath string, hash plumbing.Hash) error
- func StageFiles(repoPath string, filePaths []string) error
- func VerifyTagExists(repoPath, tagName string) (bool, error)
- func VerifyTagPushedToRemote(repoPath, remoteName, tagName string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAnnotatedTag ¶
CreateAnnotatedTag creates an annotated git tag at HEAD
func CreateAnnotatedTags ¶
CreateAnnotatedTags creates multiple annotated git tags at HEAD Returns error on first failure (no tags created if any fail)
func CreateCommit ¶
CreateCommit creates a git commit with the given message Returns error if repository is invalid or no changes are staged
func CreateLightweightTag ¶
CreateLightweightTag creates a lightweight git tag at HEAD
func CreateLightweightTags ¶
CreateLightweightTags creates multiple lightweight git tags at HEAD Returns error on first failure (no tags created if any fail)
func DeleteTags ¶ added in v0.6.1
DeleteTags removes local tags, ignoring tags that are already absent.
func EnsureTagsAbsent ¶ added in v0.6.1
EnsureTagsAbsent verifies that none of the provided tags already exist.
func FindRepositoryRoot ¶
FindRepositoryRoot finds the root directory of the git repository containing the given path
func IsRepository ¶
IsRepository checks if the given path is within a git repository
func ResetHard ¶ added in v0.6.1
ResetHard resets the working tree and HEAD to the given commit hash.
func ResetMixed ¶ added in v0.6.1
ResetMixed resets HEAD and the index to the given commit hash without changing the worktree.
func StageFiles ¶
StageFiles stages multiple files in the git repository
func VerifyTagExists ¶
VerifyTagExists checks if a tag exists in the local repository
func VerifyTagPushedToRemote ¶
VerifyTagPushedToRemote checks if a tag has been pushed to remote
Types ¶
This section is empty.