Worktrees

Repository.add_worktree(name, path[, ref])

Create a new worktree for this repository. If ref is specified, no new branch will be created and the provided ref will be checked out instead.

Repository.list_worktrees() → [str, ...]

Return a list with all the worktrees of this repository.

Repository.lookup_worktree(name) → Worktree

Lookup a worktree from its name.

class pygit2.Worktree

Worktree object.

is_prunable

Is the worktree prunable with the given set of flags?

name

Gets name worktree

path

Gets path worktree

prune(force=False)

Prune a worktree object.