Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@maccuaa/git-clean

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@maccuaa/git-clean

CLI tool for finding stale Git branches

  • 2.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

@maccuaa/git-clean

Keeping the number of branches in your git repository sane.

About

Use this scipt to identify stale git branches that should be deleted. It does this by iterating over every branch in the repository and getting the last commit author, and the date of the last commit.

Install

  1. Install git-clean from NPM.
# globally
npm i -g @maccuaa/git-clean

# in your project
npm i -D @maccuaa/git-clean

Configure

Once installed, you must configure some parameters for git-clean.

It is recommended to create a .gitcleanrc file in the root of your project.

git-clean uses the rc library for finding and loading configs. It is possible to define these settings in other places as well, for a list of all supported option please see the rc project.

This example also shows the default values git-clean uses.

# .gitcleanrc

# Required
REMOTE_URL =

# Optional
JIRA_PROJECTS =
MAIN_BRANCH = master
PROTECTED_BRANCHES = HEAD, origin/master

# SMTP Settings
# see nodeemailer for more support servers
# https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json

SMTP_SERVER = Hotmail
SMTP_USER = <username>
SMTP_PASSWORD = <password>
Options
OptionDescription
REMOTE_URLthe URL to the remote Git server
JIRA_PROJECTScomma separated list of Jira project codes that you want to display links for
MAIN_BRANCHthe name of your main branch. Generally this is the master branch
PROTECTED_BRANCHEScomma separated list of branches that are protected and should not be deleted.

Branches matching any of PROTECTED_BRANCHES values these values will not be displayed by git-clean.

For large projects with multiple developers and a large number of branches it is recommended to commit a .gitcleanrc file in the root of your project.

install git-clean as a devDependency

Contribute

FAQs

Package last updated on 14 Jul 2022

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc