branch

command
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 6 Imported by: 0

README

Branch Management Example

This example demonstrates gz-git branch management features using the CLI.

Features Demonstrated

  1. List Branches: Show all local and remote branches
  2. Create Branches: Create new branches with various options
  3. Delete Branches: Remove branches safely
  4. Worktree Management: Create branches with linked worktrees

Usage

List All Branches
# List local branches
gz-git branch list

# List all branches (including remote)
gz-git branch list --all
Create a New Branch
# Create from current HEAD
gz-git branch create feature/new-feature

# Create from specific commit/branch
gz-git branch create feature/new-feature --from main
Create Branch with Worktree
# Create branch in separate working directory
gz-git branch create feature/parallel --worktree /tmp/parallel-work
Delete a Branch
# Delete local branch
gz-git branch delete feature/old-feature

# Force delete (if not fully merged)
gz-git branch delete feature/experimental --force

Library Usage

For library integration, see Library Guide.

Basic library example:

import "github.com/gizzahub/gzh-cli-gitforge/pkg/branch"

// Branch manager provides branch operations
// Worktree manager handles worktree operations

See pkg/branch for complete API documentation.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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