A command line tool to clean up unused git branches
Last updated 2 months ago by duylam .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @duylam/git-branch-clean 
SYNC missed versions from official npm registry.



A command line tool to clean up unused git branches

Table of content

1. Usage

  1. Install nodejs. The minimum version supported is v8.x or newer
  2. Install the command line tool
npm i -g @duylam/git-branch-clean
  1. cd to a git folder
  2. To remove unused branches at
  • local branches
  • remote repo with name origin
git-branch-clean -r origin
  1. Above command prints branches that will be removed, and asks for confirmation. Below is how it looks like
$ git-branch-clean
Switching to branch 'master'
Following local branches will be deleted:
Type 'y' to delete above branch or any key for canceling, then hit Enter: y
  1. Finished! Your git folder (or remote git repo) is clean now. See more options with git-branch-clean -h

2. Contribution

2.1. Setup

2.2. Getting started

  1. Run npm install to install dependencies.
  2. Run npm start to begin watching file changes and auto build to build folder.
  3. Alter $PATH for launching build/index.js: PATH=$PATH:/this-folder/build
  4. Move to another git folder (e.g cd /some/git/folder) and run the tool: DEBUG=git-branch-clean index.js --help
  5. Begin coding, Pull Requests are welcome :)

2.3. Other development commands

  • npm run format to format the code nicer
  • npm run lint to run static code checker
  • npm run update-toc to update the Table of Content in this file
  • To create dummy local and remote (name "origin") git branches for coding, run the script ./scripts/create-dummy-branches.sh at any git folder

Current Tags

  • 1.0.5                                ...           latest (2 months ago)

1 Versions

  • 1.0.5                                ...           2 months ago
Maintainers (1)
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 3
Dependencies (5)
Dev Dependencies (16)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |