{"id":36631343,"url":"https://github.com/theburrowhub/git-gone","last_synced_at":"2026-01-12T09:37:31.668Z","repository":{"id":317712513,"uuid":"1068531766","full_name":"theburrowhub/git-gone","owner":"theburrowhub","description":"A simple to use git branch cleaner","archived":false,"fork":false,"pushed_at":"2025-12-16T18:40:44.000Z","size":163,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-18T18:56:10.049Z","etag":null,"topics":["git-plugin","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theburrowhub.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-02T14:22:13.000Z","updated_at":"2025-12-15T14:45:28.000Z","dependencies_parsed_at":"2025-10-03T17:53:46.159Z","dependency_job_id":"66259fd8-d3d9-4a6b-8e83-81ebffa68d4d","html_url":"https://github.com/theburrowhub/git-gone","commit_stats":null,"previous_names":["theburrowhub/gitcleaner","theburrowhub/git-gone"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/theburrowhub/git-gone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theburrowhub%2Fgit-gone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theburrowhub%2Fgit-gone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theburrowhub%2Fgit-gone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theburrowhub%2Fgit-gone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theburrowhub","download_url":"https://codeload.github.com/theburrowhub/git-gone/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theburrowhub%2Fgit-gone/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28337736,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["git-plugin","go","golang"],"created_at":"2026-01-12T09:37:30.977Z","updated_at":"2026-01-12T09:37:31.654Z","avatar_url":"https://github.com/theburrowhub.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-gone\n\nA Git plugin for cleaning up merged git branches interactively using fuzzy finder.\nWorks as a native Git extension: `git gone`\n\n## Features\n\n- 🔄 Updates all local references with origin\n- 🎯 Detects branches ready for deletion using multiple methods:\n  - Branches merged into the default branch (traditional merge)\n  - Branches with deleted remotes (squash/rebase merges)\n  - Platform-independent operation (works regardless of system language)\n- 🔍 Interactive multi-selection using go-fzf\n- ✅ Safe deletion with confirmation prompt\n- 📊 Clear status indicators throughout the process\n- 📋 Generate detailed branch analysis reports (text/JSON/CSV)\n\n## Installation\n\n### Homebrew (macOS/Linux)\n\n```bash\nbrew install theburrowhub/tap/git-gone\n```\n\nOr first tap the repository and then install:\n\n```bash\nbrew tap theburrowhub/tap\nbrew install git-gone\n```\n\n### Quick install\n\n```bash\n# Download and run the installation script\n# Will download pre-built binary if available, or build from source automatically\ncurl -sSL https://raw.githubusercontent.com/theburrowhub/git-gone/main/install.sh | bash\n```\n\n**Note**: The installation script will automatically:\n- Try to download pre-built releases if available\n- Fall back to building from source if no releases exist (requires Git and Go 1.19+)\n- Install the binary to `~/.local/bin` by default\n\n### From source\n\n```bash\n# Clone the repository\ngit clone https://github.com/theburrowhub/git-gone.git\ncd git-gone\n\n# Use the installation script for local build\n./install.sh\n\n# Or build manually\ngo build -o git-gone\nsudo mv git-gone /usr/local/bin/\n```\n\n### Download binary\n\nDownload the latest release from the [releases page](https://github.com/theburrowhub/git-gone/releases) for your platform.\n\n## Usage\n\n### Basic Usage\n\nNavigate to any git repository and run:\n\n```bash\ngit gone\n# or\ngit-gone\n# or explicitly\ngit-gone branches\n```\n\n### Available Commands\n\n- **`git-gone` or `git-gone branches`**: Clean up merged branches (default)\n- **`git-gone report`**: Generate branch analysis report without deleting\n- **`git-gone version`**: Show version information\n- **`git-gone help`**: Show help information\n\n### What the tool does:\n1. Update all remote references (`git fetch --all --prune`)\n2. Identify the default branch (main/master)\n3. Find deletable branches using two methods:\n   - Branches merged into the default branch (traditional merges)\n   - Branches whose remote tracking branch is gone (squash/rebase merges)\n4. Present an interactive list where you can:\n   - Use arrow keys to navigate\n   - Press `Tab` or `Space` to select/deselect branches\n   - Press `Enter` to confirm selection\n   - Press `Esc` to cancel\n   - Type to filter branches by name\n5. Ask for confirmation before deleting selected branches\n6. Delete the selected branches safely\n\n## Report Mode\n\nGenerate a detailed analysis report without deleting any branches:\n\n### Basic Report\n\n```bash\ngit-gone report\n```\n\n### Output Formats\n\n```bash\n# Text format (default)\ngit-gone report --output text\n\n# JSON format (for scripting/automation)\ngit-gone report --output json\ngit-gone report -o json\n\n# CSV format (for spreadsheets)\ngit-gone report --output csv\n```\n\n### Save to File\n\n```bash\ngit-gone report --output json --file report.json\n```\n\n### Include Unmerged Branches\n\n```bash\ngit-gone report --unmerged\ngit-gone report -u\n```\n\n### Report Categories\n\nThe report classifies branches into:\n\n- **Safe to Delete**: Merged branches or branches with deleted remotes\n- **Local-only**: Merged but never pushed to remote (review recommended)\n- **Unmerged**: Not merged, requires `--unmerged` flag to include\n- **Protected**: Default branch or currently checked out\n\n### Example Report Output\n\n```\n============================================================\n              GIT-GONE BRANCH ANALYSIS REPORT\n============================================================\nRepository: /path/to/repo\nDate: 2026-01-09 14:30:00\nDefault Branch: main\nCurrent Branch: feature/ui\n\n------------------------------------------------------------\nSAFE TO DELETE (2 branches)\n------------------------------------------------------------\n  * feature/old-login\n    Method: merged | Reason: Merged into main\n    Remote: gone | Last commit: 2025-12-15\n\n------------------------------------------------------------\nLOCAL-ONLY (1 branch) - Merged but never pushed\n------------------------------------------------------------\n  * temp/local-experiment\n    Method: merged | Reason: Merged but never pushed to remote\n    Remote: local_only | Last commit: 2025-12-10\n\n------------------------------------------------------------\nPROTECTED (2 branches)\n------------------------------------------------------------\n  * main\n    Reason: Default branch\n\n  * feature/ui\n    Reason: Currently checked out\n\n============================================================\nSUMMARY: 2 safe | 1 local-only | 0 unmerged | 2 protected\n============================================================\n```\n\n## Command Structure\n\ngit-gone uses a subcommand structure powered by Cobra:\n\n```bash\n# Show general help\ngit-gone --help\ngit-gone -h\n\n# Show version\ngit-gone version\n\n# Clean branches (default command)\ngit-gone\ngit-gone branches\n\n# Get help for specific command\ngit-gone branches --help\ngit-gone report --help\n\n# Generate analysis report\ngit-gone report\n\n# Report in JSON format\ngit-gone report --output json\ngit-gone report -o json\n```\n\n**Note**: When using as a Git plugin (`git gone`), commands work the same way:\n- `git gone` - runs branch cleanup\n- `git gone version` - shows version\n- `git gone -h` - shows help\n\n## Interactive Controls\n\n- **↑/↓**: Navigate through the list\n- **Tab/Space**: Toggle selection of current branch\n- **Enter**: Confirm selection and proceed\n- **Esc**: Cancel operation\n- **Type**: Filter branches by name\n\n## Safety Features\n\n- Never deletes the default branch (main/master)\n- Never deletes the current branch\n- Shows only branches that have been merged\n- Requires explicit confirmation before deletion\n- Attempts safe deletion first (`git branch -d`)\n- Falls back to force deletion only if necessary\n\n## Requirements\n\n- Go 1.19 or higher\n- Git installed and configured\n- Terminal with UTF-8 support (for emoji indicators)\n\n## Dependencies\n\n- [github.com/koki-develop/go-fzf](https://github.com/koki-develop/go-fzf) - Fuzzy finder library\n\n## How it Works as a Git Plugin\n\nWhen you install `git-gone`, the binary is placed in your `$PATH`. Git automatically recognizes executables named `git-\u003ccommand\u003e` as git subcommands, allowing you to use it as `git gone`.\n\n## Development\n\n### Creating a new release\n\nReleases are automatically created when you push a tag starting with `v`:\n\n```bash\n# Create a new tag\ngit tag v0.3.0 -m \"Release version 0.3.0\"\n\n# Push the tag to GitHub\ngit push origin v0.3.0\n```\n\nGitHub Actions will automatically:\n1. Build binaries for all platforms (Linux, macOS, Windows)\n2. Create a GitHub release with the binaries\n3. Generate checksums for all files\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheburrowhub%2Fgit-gone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheburrowhub%2Fgit-gone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheburrowhub%2Fgit-gone/lists"}