npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

git-tidier

v1.2.0

Published

cli tool to clean git branch interactively

Downloads

30

Readme

git-tidier

git-tidier is a tool for cleaning up git branches.

node-ci NPM Version NPM Downloads codecov

Features

  • Multiple modes supported: interactive mode, custom regular matching mode, and all in mode
  • By default, the recently used branch and the main branch are protected. Check whether the working directory needs to be cleaned up.
  • try to clear the local remote branch ( support v1.2.+)

Contributing

Contributor Covenant GitHub contributors

We welcome community contributions to this project.

Please read Contributor Guide for more information on how to get started.

usage

Install

$ npm install -g git-tidier
# help
$ git-tidier --help
$ git-tidier --version
# uninstall
$ npm uninstall -g git-tidier

Before Use

Note: Deleting a branch is a very dangerous thing, please ensure that the current warehouse work has been completed, carefully check the prompt information

good development habits are

  • any branch remains clean
  • Before switching branches each time, do not have legacy commits or stash to prevent forgetting.

How do I check if a branch is active?

$ git branch --sort=committerdate

check

check if current git needs cleanup

$ git-tidier check

# protect the nearest activity 3 branches
$ git-tidier check -n 3

clear

  • To ensure that branches are not deleted by mistake as much as possible, the git-tidier ignores the main branch, the current branch, and the three most recently active branches by default (the default behavior can be overridden by configuration)
  • git-tidier deletes the local branch and the remote branch corresponding to the remote origin by default
  • If the deletion is unstable, it can be set to git-tidier clear -n 5 . Do you need to clear it on the premise of keeping the latest 5 branches?

InteractionMode

$ git-tidier clear
# or
$ git-tidier clean -i

CommandMode

# Delete local branches only, remote branches with the same name are deleted by default
$ git-tidier clear -l

# delete all branches except the protection branch
$ git-tidier clear -a

# force delete
$ git-tidier clear -f

# Regular matching pattern support js regular expression custom search branch
# Delete all branches starting with FE-
$ git-tidier clear -e -p '/FE-.*/'
# The regular matching pattern also protects the main branch if you want to remove all set -n 0
$ git-tidier clear -e -p '/FE-.*/' -n 0
  • clean configuration
# Modify the remote name ori (the default remote name origin)
$ git-tidier clear -r ori

# ignore dev when cleaning develop branch
$ git-tidier clear -ig dev develop

# The number of protected branches is 5, and the default number is 3.
$ git-tidier clear -n 5