Skip to content

A Node.js script for efficiently cleaning up Git repositories by automating the deletion of merged branches both locally and remotely. Designed for simplicity and ease of use, it supports various Git workflows and ensures a tidy version control environment

License

Notifications You must be signed in to change notification settings

TechBorn99/git-branch-cleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Git Branch Cleaner

This Node.js script automates the process of deleting local and remote Git branches that have been merged into the main branch. It's a simple, yet effective tool to keep your Git repositories clean and manageable.

Features

  • Identifies and deletes local branches that have been merged into the main branch.
  • Identifies and deletes remote branches that have been merged.
  • Supports custom main branch and remote names.

Prerequisites

  • Node.js installed on your system.
  • Git installed and configured.
  • Necessary permissions to delete branches on the remote repository.

Installation and Usage

  • Clone this repository to your local machine
  • Navigate to the script directory
  • Run the script from the root of your Git repository with the command: node deleteMergedBranches.js <main_branch> <remote_name>
    • Replace <main_branch> with your main branch name (e.g., main or master) and <remote_name> with the name of your remote (e.g., origin).

License

This project is licensed under the MIT License.

About

A Node.js script for efficiently cleaning up Git repositories by automating the deletion of merged branches both locally and remotely. Designed for simplicity and ease of use, it supports various Git workflows and ensures a tidy version control environment

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published