git

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAndCommitFiles

func AddAndCommitFiles(fileNames []string, commitMessage string) (string, error)

AddAndCommitFiles adds files to the staging area and commits them with a message. Returns the commit output for logging purposes.

func BranchExists

func BranchExists(branchName string) (bool, error)

BranchExists checks if a branch with the given name exists in the Git repository.

func CheckGitClean

func CheckGitClean() error

CheckGitClean checks if the Git repository is clean (i.e., no uncommitted changes).

func CreateAndSwitchBranch

func CreateAndSwitchBranch(branchName string) (string, error)

CreateAndSwitchBranch creates a new branch and switches to it. Returns the command output for logging purposes.

func CreateGitHubPullRequest

func CreateGitHubPullRequest() (string, error)

CreateGitHubPullRequest creates a pull request on GitHub using the GitHub CLI. Returns the output of the command for logging purposes.

func DeleteLocalBranch

func DeleteLocalBranch(branchName string) (string, error)

DeleteLocalBranch deletes a local branch with the specified name. Returns the command output for logging purposes.

func GetCurrentBranch

func GetCurrentBranch() (string, error)

GetCurrentBranch retrieves the name of the current branch in the Git repository.

func IsGitRoot

func IsGitRoot() (bool, error)

IsGitRoot checks if the current working directory is the root of a Git repository.

func PushChanges

func PushChanges(remote string, branch string) (string, error)

PushChanges pushes the changes to the specified remote and branch. Returns the command output for logging purposes.

func SwitchToBranch

func SwitchToBranch(branchName string) (string, error)

SwitchToBranch switches to the specified branch in the Git repository. Returns the command output for logging purposes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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