Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 716 Bytes

File metadata and controls

44 lines (30 loc) · 716 Bytes

sweep

Delete all branches except the specified branch.

Requirements

  • Unix-like operating system (Linux or macOS)
  • Git

Installation

go install github.com/yuzoiwasaki/sweep@latest

or

# For Linux (amd64)
curl -fLo /usr/local/bin/sweep \
    https://github.com/yuzoiwasaki/sweep/blob/master/bin/sweep

# For macOS Intel
curl -fLo /usr/local/bin/sweep \
    https://github.com/yuzoiwasaki/sweep/blob/master/bin/sweep-darwin-amd64

# For macOS Apple Silicon
curl -fLo /usr/local/bin/sweep \
    https://github.com/yuzoiwasaki/sweep/blob/master/bin/sweep-darwin-arm64

Usage

Delete all branches except main.

sweep

Delete all branches except foo.

sweep -v foo