git

package
v0.27.3 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBranch

func CreateBranch(repoPath, branchName, fromRef string) error

func CreateWorktree

func CreateWorktree(repoPath, worktreePath, branchName string) error

func DeleteBranch

func DeleteBranch(repoPath, branchName string) error

func DirtyFiles added in v0.3.0

func DirtyFiles(dir string) ([]string, error)

func DiscoverDefaultBranch

func DiscoverDefaultBranch(repoPath string) (string, error)

func DiscoverDefaultBranchOrHEAD added in v0.19.0

func DiscoverDefaultBranchOrHEAD(repoPath string) (string, error)

func DiscoverGitHubUsername

func DiscoverGitHubUsername(repoPath string) (string, error)

func FetchOrigin

func FetchOrigin(repoPath string) error

func HasRemote added in v0.19.0

func HasRemote(dir string, name string) bool

func HasUncommittedChanges

func HasUncommittedChanges(dir string) (bool, error)

func IsInsideGitRepo

func IsInsideGitRepo(dir string) bool

func ParseGitHubUsername

func ParseGitHubUsername(remoteURL string) (string, bool)

func RefExists

func RefExists(dir string, ref string) bool

func RemoveWorktree

func RemoveWorktree(repoPath, worktreePath string) error

func RepoRootPath

func RepoRootPath(dir string) (string, error)

func Run

func Run(dir string, args ...string) (string, string, error)

func RunCheck

func RunCheck(dir string, args ...string) bool

func RunOutput

func RunOutput(dir string, args ...string) (string, error)

func SetupSession

func SetupSession(repoPath, worktreePath, branchName, baseBranch string, fetch bool) error

func TeardownSession

func TeardownSession(repoPath, worktreePath, branchName string) error

func UnpushedCommitCount

func UnpushedCommitCount(worktreePath, baseBranch string) (int, error)

func UnpushedCommitSummaries added in v0.3.0

func UnpushedCommitSummaries(worktreePath, baseBranch string) ([]string, error)

func WorktreeGitDirs added in v0.19.0

func WorktreeGitDirs(worktreePath string) (gitDir, commonDir string, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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