{"id":15294693,"url":"https://github.com/mediamonks/git-housekeeper","last_synced_at":"2025-04-13T14:53:46.280Z","repository":{"id":27580857,"uuid":"114489770","full_name":"mediamonks/git-housekeeper","owner":"mediamonks","description":"A housekeeping utility to clean up your git repository","archived":false,"fork":false,"pushed_at":"2023-01-04T01:21:05.000Z","size":1362,"stargazers_count":15,"open_issues_count":21,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T02:38:45.407Z","etag":null,"topics":["cli-app","git","google-sheets","review-branches"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mediamonks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-16T20:57:31.000Z","updated_at":"2022-02-07T16:27:32.000Z","dependencies_parsed_at":"2023-01-14T08:30:46.599Z","dependency_job_id":null,"html_url":"https://github.com/mediamonks/git-housekeeper","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mediamonks%2Fgit-housekeeper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mediamonks%2Fgit-housekeeper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mediamonks%2Fgit-housekeeper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mediamonks%2Fgit-housekeeper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mediamonks","download_url":"https://codeload.github.com/mediamonks/git-housekeeper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248637780,"owners_count":21137538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli-app","git","google-sheets","review-branches"],"created_at":"2024-09-30T17:06:05.403Z","updated_at":"2025-04-13T14:53:46.257Z","avatar_url":"https://github.com/mediamonks.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git Housekeeper\nKeeping your git repository clean can be a pain, especially when working with large teams and large codebases.\nAre you lost in the giant pile of outdated branches of remote? Tired of asking all your team members to clear their unused branches?\nGit Housekeeper is here to help!\n\n## Available utilities\n### Review branches on remote\nThis utility helps you review all the branches on remote, and remove any unused branches if necessary.\n#### Using Google Sheets\n\u003e In order to easily generate Google Sheets, git-housekeeper hosts an API that calls the Google API\n\u003e with the meta information of the branches in your repository. If you would rather not share\n\u003e repository information with our API, you have the option to use to the Google API directly.\n\u003e [Follow these instructions](https://github.com/mediamonks/git-housekeeper/wiki/Using-Google-API)\n\u003e if you want to use the Google API directly.\n\n1. A Google Sheet will be generated by Git Housekeeper containing information on all remote branches.\n[Click here to see an example sheet](https://docs.google.com/spreadsheets/d/1yptzd3ytvXT8ydxVdXOyPYt3sZu0jHrkslLn_Cil6IQ/edit?usp=sharing)\n2. Share this Google Sheet with your team. You can now collaboratively decide which branches to keep by selecting either `KEEP` or `DELETE`\nin the action column of each row. The row will turn red or green depending on the selected action.\n3. Return to Git Housekeeper to process the sheet. It will list all the branches that have been marked with `DELETE`, and (after your\nconfirmation) batch delete all those branches.\n\n![Example Google Sheet](docs/sheet_screenshot.JPG?raw=true \"Example Google Sheet\")\n\n#### Interactive mode\nIf you would rather not use Google Sheets and review the remote branches by yourself, you can run in interactive mode. Select\n\"ask me which branches I would like to keep\" from the menu.\n\n### Review tracking branches gone on remote\nSometimes a local branch is tracking a branch on remote, but the remote branch is already gone. This can often happen when the branch\nis finished on another machine, or if the branch has been merged using a web interface. This utility lists all those branches, and if\nneeded cleans them all up in one batch!\n\n## Installation\n - Install Node.JS v6.0.0 or higher\n - Install the package using `npm install -g git-housekeeper`\n   \u003e 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.\n\n### Building from source\nTo use the source code instead of installing from NPM:\n - Clone this repository\n - Build the project using `npm run build`\n - Run commands using `node main.js \u003cargs\u003e` instead of `git-housekeeper \u003cargs\u003e`\n\n## Usage\nRun one of the commands listed below. Then follow the on-screen instructions\n#### Commands\n - `git-housekeeper [options] \u003cpath\u003e` run git-housekeeper on the given repository\n - `git-housekeeper process-sheet [options] \u003cpath\u003e` process a Google Sheet previously created with git-housekeeper\n\n#### Arguments:\n - `path` [string] the path to the repository to analyse, relative to the current working directory.\n\n#### Options\n - `-d, --dry-run` Executes a dry run (won't remove any branches) _defaults to `false`_\n - `--version` Show version number\n - `--help` Show help\n\n#### Git authentication\nWhen trying to connect to an `https` git remote, Git Housekeeper should automatically prompt you to enter a username and password.\nIf your remote is setup using `ssh` instead, you need to run an SSH agent in the background with valid keys.\nOn Windows, [pageant](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html) can be used as an SSH agent.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmediamonks%2Fgit-housekeeper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmediamonks%2Fgit-housekeeper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmediamonks%2Fgit-housekeeper/lists"}