Documentation
¶
Overview ¶
Package worktree manages isolated task checkouts without discarding user work.
Package worktree wraps `git worktree` for safe programmatic use.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add creates a new worktree at `path` checked out to `branch`. If the branch doesn't exist, git creates it from HEAD.
func RemoveForce ¶
RemoveForce removes the worktree even if it has uncommitted changes.
Types ¶
type AcquireOptions ¶
type ManagedTree ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) Acquire ¶
func (m *Manager) Acquire(task string, opts AcquireOptions) (*ManagedTree, error)
func (*Manager) Get ¶
func (m *Manager) Get(task string) *ManagedTree
func (*Manager) List ¶
func (m *Manager) List() []*ManagedTree
type ReleaseOptions ¶
Click to show internal directories.
Click to hide internal directories.