Skip to content

denny351/delete-branches

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Delete Branches Script

A simple and interactive CLI tool to help you delete Git branches with ease.


Features

  • Lists all local Git branches.
  • Allows selection of branches to keep using arrow keys and TAB.
  • Displays a confirmation screen to review and confirm your selections before deleting branches.
  • Provides a --force flag to delete unmerged branches using git branch -D.

Note: This script only deletes branches from your local machine. Remote branches are not affected.


Prerequisites

The script depends on fzf for interactive selection. If fzf is not already installed, the installation script will attempt to install it for you.


Installation

To install the delete-branches script run the following command:

curl -s https://raw.githubusercontent.com/denny351/delete-branches/main/install.sh | bash

Usage

  1. Navigate to the root of your Git repository.
  2. Run the script:
    delete-branches [--force]
  3. Follow the interactive steps:
    • Use arrow keys and TAB to select branches to keep.
    • Press ENTER to confirm your selection.
    • Review the confirmation screen and type yes to proceed or no to cancel.

Uninstallation

To uninstall the delete-branches script and optionally remove fzf, run the following command:

curl -s https://raw.githubusercontent.com/denny351/delete-branches/main/uninstall.sh | bash

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages