worktree

package
v2.9.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package worktree git-worktree - Manage multiple working trees.

SYNOPSIS

Reference: https://git-scm.com/docs/git-worktree

git worktree add [-f] [--detach] [--checkout] [--lock] [-b <new-branch>] <path> [<branch>]
git worktree list [--porcelain]
git worktree lock [--reason <string>] <worktree>
git worktree prune [-n] [-v] [--expire <expire>]
git worktree unlock <worktree>

DESCRIPTION

Manage multiple working trees attached to the same repository.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(path, branch string) types.Option

Add git worktree add [-f] [--detach] [--checkout] [--lock] [-b <new-branch>] <path> [<branch>]

func Branch

func Branch(branch string) types.Option

Branch [-b]

func BranchOverride

func BranchOverride(branch string) types.Option

BranchOverride [-B]

func Checkout

func Checkout(g *types.Cmd)

Checkout [--checkout]

func Detach

func Detach(g *types.Cmd)

Detach [--detach]

func DryRun

func DryRun(g *types.Cmd)

DryRun [-n | --dry-run]

func Expire

func Expire(time string) types.Option

Expire [--expire <time>]

func Force

func Force(g *types.Cmd)

Force [-f | --force]

func List

func List(g *types.Cmd)

List git worktree list [--porcelain]

func Lock

func Lock(worktree string) types.Option

Lock git worktree lock [--reason <string>] <worktree>

func LockOption

func LockOption(g *types.Cmd)

LockOption [--lock]

func NoCheckout

func NoCheckout(g *types.Cmd)

NoCheckout [--no-checkout]

func Porcelain

func Porcelain(g *types.Cmd)

Porcelain [--porcelain]

func Prune

func Prune(g *types.Cmd)

Prune git worktree prune [-n] [-v] [--expire <expire>]

func Reason

func Reason(value string) types.Option

Reason [--reason <string>]

func UnLock

func UnLock(worktree string) types.Option

UnLock git worktree unlock <worktree>

func Verbose

func Verbose(g *types.Cmd)

Verbose [-v | --verbose]

Types

This section is empty.

Jump to

Keyboard shortcuts

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