Socket
Book a DemoInstallSign in
Socket

git-groom

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-groom

A CLI tool for cleaning up Git branches, tags, and remotes

0.1.3
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

git-groom

Overview

git-groom is a CLI tool designed to help developers clean up their Git repositories by automatically identifying and deleting merged branches, pruning stale remote branches, and removing unnecessary tags. This helps keep repositories neat and prevents clutter from accumulating over time.

Features

  • Delete merged local branches: Removes branches that have already been merged into the main branch.
  • Delete merged remote branches: Identifies and removes merged branches from the remote repository.
  • Prune stale remote-tracking branches: Cleans up remote-tracking branches that no longer exist on the remote.
  • Delete merged tags: Removes tags that have already been merged into the main branch.

Installation

To install git-groom globally, run:

npm install -g git-groom

Usage

Run git-groom to clean up your repository:

git-groom

By default, git-groom operates on the main branch of your repository, automatically detecting whether the main branch is main, master, or another name.

You can specify a branch to clean up merged branches from:

git-groom <branch-name>

Example

git-groom develop

This will remove all branches merged into develop, prune stale remote branches, and clean up merged tags.

Error Handling

git-groom gracefully handles errors such as:

  • Repositories without a remote.
  • Branches with no commits.
  • Attempting to delete unmerged branches.

If an error occurs, it will be displayed with details on how to resolve it.

Contributing

Contributions are welcome! If you find a bug or have a feature request, please open an issue or submit a pull request on GitHub.

License

This project is licensed under the MIT License.

Keywords

git

FAQs

Package last updated on 07 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.