1.0.5-beta.1 • Published 4 years ago
@duylam/git-gc v1.0.5-beta.1
git-gc
git-gc
was renamed to git-branch-clean
. Please visit and use git-branch-clean package instead
A command line tool to clean up unused git branches
Table of content
1. Usage
- Install nodejs. The minimum version supported is v8.x or newer
- Install the command line tool
npm i -g @duylam/git-gc
cd
to a git folder- To remove unused branches at
- local branches
git-gc
- remote repo with name
origin
git-gc -r origin
- Above command prints branches that will be removed, and asks for confirmation. Below is how it looks like
$ git-gc
Switching to branch 'master'
Following local branches will be deleted:
sample-branch-1
sample-branch-2
sample-branch-3
Type 'y' to delete above branch or any key for canceling, then hit Enter: y
Finished!
- Finished! Your git folder (or remote git repo) is clean now. See more options with
git-gc -h
2. Contribution
2.1. Setup
- NodeJs v8.x
2.2. Getting started
- Run
npm install
to install dependencies. - Run
npm start
to begin watching file changes and auto build tobuild
folder. - Alter
$PATH
for launchingbuild/index.js
:PATH=$PATH:/this-folder/build
- Move to another git folder (e.g
cd /some/git/folder
) and run the tool:DEBUG=git-gc index.js --help
- Begin coding, Pull Requests are welcome :)
2.3. Other development commands
npm run format
to format the code nicernpm run lint
to run static code checkernpm 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
1.0.5-beta.1
4 years ago
1.0.4
4 years ago
1.0.1
4 years ago
1.0.0-beta.3
4 years ago
1.0.3
4 years ago
1.0.0-beta.2
4 years ago
1.0.0-beta.1
4 years ago