git

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindGitRoot

func FindGitRoot(startPath string) (string, error)

FindGitRoot finds the git repository root directory

Types

type Manager

type Manager interface {
	List() ([]Worktree, error)
	Add(path, branch string, createBranch bool) error
	Remove(path string, force bool) error
	GetCurrentPath() (string, error)
	DeleteBranch(branch string, force bool) error
	HasUnpushedCommits(branch string) (bool, int, error)
}

Manager handles git worktree operations

func NewManager

func NewManager() (Manager, error)

NewManager creates a new git worktree manager

type Worktree

type Worktree struct {
	Path      string
	Branch    string
	Commit    string
	IsCurrent bool
}

Worktree represents a git worktree

Jump to

Keyboard shortcuts

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