git

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateWorktree

func CreateWorktree(repoPath, worktreePath, branch string) error

CreateWorktree creates a new git worktree

func GetUncommittedChangesCount

func GetUncommittedChangesCount(worktreePath string) (int, error)

GetUncommittedChangesCount returns the number of uncommitted changes

func GetWorktreeBranch

func GetWorktreeBranch(worktreePath string) (string, error)

GetWorktreeBranch returns the branch name for a worktree

func HasUncommittedChanges

func HasUncommittedChanges(worktreePath string) (bool, error)

HasUncommittedChanges checks if a worktree has uncommitted changes

func PruneWorktrees

func PruneWorktrees(repoPath string) error

PruneWorktrees prunes stale worktree metadata

func RemoveWorktree

func RemoveWorktree(repoPath, worktreePath string) error

RemoveWorktree removes a git worktree

Types

type WorktreeInfo

type WorktreeInfo struct {
	Path   string
	Branch string
	Clean  bool
}

WorktreeInfo holds information about a worktree

func ListWorktrees

func ListWorktrees(repoPath string) ([]WorktreeInfo, error)

ListWorktrees lists all worktrees for a repository

Jump to

Keyboard shortcuts

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