Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
git-housekeeper
Advanced tools
Keeping your git repository clean can be a pain, especially when working with large teams and large codebases. Are you lost in the giant pile of outdated branches of remote? Tired of asking all your team members to clear their unused branches? Git Housekeeper is here to help!
This utility helps you review all the branches on remote, and remove any unused branches if necessary.
In order to easily generate Google Sheets, git-housekeeper hosts an API that calls the Google API with the meta information of the branches in your repository. If you would rather not share repository information with our API, you have the option to use to the Google API directly. Follow these instructions if you want to use the Google API directly.
KEEP
or DELETE
in the action column of each row. The row will turn red or green depending on the selected action.DELETE
, and (after your
confirmation) batch delete all those branches.If you would rather not use Google Sheets and review the remote branches by yourself, you can run in interactive mode. Select "ask me which branches I would like to keep" from the menu.
Sometimes a local branch is tracking a branch on remote, but the remote branch is already gone. This can often happen when the branch is finished on another machine, or if the branch has been merged using a web interface. This utility lists all those branches, and if needed cleans them all up in one batch!
npm install -g git-housekeeper
It is recommended to install the git-housekeeper package globally, so you can run it from any directory. However, you can also include it as a dev-dependency in your project.
To use the source code instead of installing from NPM:
npm run build
node main.js <args>
instead of git-housekeeper <args>
Run one of the commands listed below. Then follow the on-screen instructions
git-housekeeper [options] <path>
run git-housekeeper on the given repositorygit-housekeeper process-sheet [options] <path>
process a Google Sheet previously created with git-housekeeperpath
[string] the path to the repository to analyse, relative to the current working directory.-d, --dry-run
Executes a dry run (won't remove any branches) defaults to false
--version
Show version number--help
Show helpWhen trying to connect to an https
git remote, Git Housekeeper should automatically prompt you to enter a username and password.
If your remote is setup using ssh
instead, you need to run an SSH agent in the background with valid keys.
On Windows, pageant can be used as an SSH agent.
FAQs
A housekeeping utility to clean up your git repository
We found that git-housekeeper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.