gch

command module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 9, 2025 License: MIT Imports: 3 Imported by: 0

README

gch - Smart Git Branch Checkout Tool

A powerful Git branch checkout tool that provides fast and intuitive branch switching with fuzzy matching capabilities.

Features

  • Fuzzy branch name matching
  • Interactive branch selector
  • Remote branch tracking

Installation

  • Using Homebrew:
brew tap reckerp/tap
brew install gch
  • Using go install:
go install github.com/reckerp/gch@latest

Usage

Basic Usage
# Checkout a branch using partial name
gch prod            # Checkout branch containing 'prod'
gch 123             # Checkout branch containing '123'

# Create and checkout a new branch
gch -b feature      # Create and checkout new branch 'feature'
gch -b feat/user    # Create and checkout new branch 'feat/user'

# Force checkout (discard local changes)
gch -f prod         # Force checkout branch containing 'prod'
gch -b -f feature   # Force create and checkout new branch

# Show interactive branch selector
gch                 # List all branches for interactive selection
Command Line Options
  • -b, --branch: Create and checkout a new branch with the given name
  • -f, --force: Force checkout, discarding any local changes
  • --debug: Enable debug output for branch matching process

Development

Building
# Build the binary
make build

# Install the tool to $(HOME)/bin
make install

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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