0.2.3 • Published 8 months ago

branchkiller v0.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Branch Killer

A command-line tool to easily delete all git local and remote branches except 'main'. Delete Git branches in bulk ✂️

Table of Contents

:heavy_check_mark: Features

  • Delete Local Branches: Easily manage and remove unnecessary local branches in your Git repository with an interactive CLI interface.

  • Delete Remote Branches: Clean up remote branches that are no longer needed by pushing deletions directly to the origin.

  • Branch Exclusion: Exclude specific branches (e.g., main, origin/main) from being selected for deletion to avoid accidental removal of important branches.

  • Interactive Selection: Choose which branches to delete through a user-friendly prompt, with checkboxes for easy multi-selection.

  • Confirmation Step: Prevent accidental deletions by requiring confirmation before proceeding with branch removal.

:cloud: Installation

$ npm i -g branchkiller

:clipboard: Usage

$ branchkiller

By default, branchkiller will scan your local and remote branches, excluding branches like your current local branch, main and origin/main from being selected for deletion.

Options

ARGUMENTDESCRIPTION
-e, --exclude branches...Exclude branches (default: "main","origin/main",current local branch)
--no-localDo not delete local branches
--no-remoteDo not delete remote branches
--no-interactiveDo not ask for confirmation before deleting branches
-f, --forceForce branch deletion
-V, --verboseBe verbose when deleting branches, showing them as they are deleted
-h, --helpDisplay help for command
-v, --versionDisplay branchkiller version

Examples

  • Exclude local branch
branchkiller --exclude mylocalbranch

# other alternative:
branchkiller -e mylocalbranch
  • Exclude remote branch
branchkiller --exclude origin/myremotebranch

# other alternative:
branchkiller -e origin/myremotebranch
  • Exclude multiple branches (local and remote)
branchkiller --exclude mylocalbranch origin/myremotebranch

# other alternative:
branchkiller -e mylocalbranch origin/myremotebranch

:hammer_and_wrench: Contributing

Contributions are welcome! Please feel free to fork the repository, make changes, and submit pull requests.

:scroll: License

MIT © Sergio Navarro

0.2.3

8 months ago

0.2.1

9 months ago

0.2.2

9 months ago

0.2.0

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago

0.1.0

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago