{"id":29264331,"url":"https://github.com/knwoop/giwo","last_synced_at":"2025-07-04T12:31:49.204Z","repository":{"id":297705513,"uuid":"997435951","full_name":"knwoop/giwo","owner":"knwoop","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-08T02:33:12.000Z","size":57,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-28T19:02:44.972Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/knwoop.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2025-06-06T14:20:27.000Z","updated_at":"2025-06-16T05:00:37.000Z","dependencies_parsed_at":"2025-06-07T06:18:13.606Z","dependency_job_id":"7f388d73-38b1-4bba-bbe4-4e847da7ce1b","html_url":"https://github.com/knwoop/giwo","commit_stats":null,"previous_names":["knwoop/gwt","knwoop/giwo"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/knwoop/giwo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knwoop%2Fgiwo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knwoop%2Fgiwo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knwoop%2Fgiwo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knwoop%2Fgiwo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/knwoop","download_url":"https://codeload.github.com/knwoop/giwo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knwoop%2Fgiwo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263540361,"owners_count":23477454,"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":[],"created_at":"2025-07-04T12:30:37.453Z","updated_at":"2025-07-04T12:31:49.188Z","avatar_url":"https://github.com/knwoop.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# giwo - Git WorkTree Manager\n\nA CLI tool for efficiently managing Git worktrees. Supports parallel work across multiple branches and manages the entire lifecycle of worktrees.\n\n## Installation\n\n```bash\ngo install github.com/knwoop/giwo@latest\n```\n\n## Commands\n\n### `giwo create \u003cbranch-name\u003e`\n\nCreate a new worktree based on the default branch.\n\n```bash\ngiwo create feature-auth\ngiwo create bugfix-login --base develop\ngiwo create experiment-ui --force\n```\n\n**Options:**\n- `--base \u003cbranch\u003e` - Base branch to create worktree from (default: repository default branch)\n- `--force` - Force creation even if directory exists\n\n**Features:**\n- Places worktree in `.worktree/\u003cbranch-name\u003e`\n- Automatically creates and switches to new branch\n- Copies config files (.env, .gitignore, .editorconfig, etc.)\n- Fetches default branch via GitHub API (requires GITHUB_TOKEN)\n\n### `giwo remove \u003cbranch-name\u003e`\n\nRemove a worktree and optionally its local branch.\n\n```bash\ngiwo remove feature-auth\ngiwo remove bugfix-login --keep-branch\ngiwo remove old-feature --force\n```\n\n**Aliases:** `rm`, `delete`\n\n**Options:**\n- `--force` - Force removal without confirmation\n- `--keep-branch` - Keep the local branch after removing worktree\n\n### `giwo list`\n\nDisplay all worktrees with status information.\n\n```bash\ngiwo list\ngiwo list --verbose\ngiwo list --format json\n```\n\n**Aliases:** `ls`\n\n**Options:**\n- `--verbose` - Show detailed information (commits, changes, etc.)\n- `--format \u003ctable|json|simple\u003e` - Output format\n\n### `giwo status`\n\nShow worktree statistics and recommendations.\n\n```bash\ngiwo status\n```\n\n**Output:**\n- Total worktrees count\n- Active vs dirty worktrees\n- Merged branches that can be cleaned\n- Recommended actions\n\n### `giwo clean`\n\nBatch remove worktrees for merged branches.\n\n```bash\ngiwo clean\ngiwo clean --dry-run\ngiwo clean --force\n```\n\n**Options:**\n- `--dry-run` - Show what would be removed without actually removing\n- `--force` - Force removal without confirmation\n\n**Features:**\n- Automatically detects merged branches\n- Excludes main/master/develop branches\n- Shows branch status before removal\n\n### `giwo switch [filter]`\n\nSwitch to a worktree interactively with fuzzy search support.\n\n```bash\ngiwo switch\ngiwo switch feature\ngiwo switch --fuzzy\ngiwo switch --filter auth\ngiwo switch --print\n```\n\n**Aliases:** `sw`\n\n**Options:**\n- `--fuzzy` - Use interactive fuzzy search (like fzf)\n- `--filter \u003ctext\u003e` - Filter worktrees by branch name\n- `--print` - Print the selected worktree path instead of switching\n\n**Features:**\n- Interactive selection with numbered options\n- Fuzzy search with real-time filtering\n- Visual status indicators (clean/dirty, ahead/behind)\n- Shell integration support\n\n### `giwo prune`\n\nRemove administrative files for orphaned worktrees.\n\n```bash\ngiwo prune\n```\n\nWrapper around `git worktree prune -v`.\n\n## GitHub Integration\n\nSet `GITHUB_TOKEN` environment variable to enable:\n- Automatic default branch detection\n- Better API rate limits\n\n```bash\nexport GITHUB_TOKEN=your_token_here\n```\n\n## Directory Structure\n\n```\nproject-root/\n├── .worktree/\n│   ├── feature-auth/     # feature-auth branch\n│   ├── bugfix-login/     # bugfix-login branch\n│   └── experiment-ui/    # experiment-ui branch\n└── main-worktree/        # Main worktree\n```\n\n## Shell Integration\n\nFor seamless directory switching, source the provided shell script:\n\n```bash\n# Add to your .bashrc or .zshrc\nsource /path/to/giwo/scripts/giwo-switch.sh\n\n# Now you can use:\ngws                    # Interactive switch\ngwf                    # Fuzzy search\ngiwo-switch --filter ui # Filter and switch\n```\n\n## Examples\n\n```bash\n# Create a new feature branch worktree\ngiwo create feature-auth\n\n# Switch to a worktree interactively\ngiwo switch\n\n# Use fuzzy search to find and switch\ngiwo switch --fuzzy\n\n# Filter worktrees and switch\ngiwo switch auth\n\n# List all worktrees\ngiwo list --verbose\n\n# Check status and get recommendations\ngiwo status\n\n# Clean up merged branches\ngiwo clean --dry-run\ngiwo clean\n\n# Remove specific worktree\ngiwo remove feature-auth\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknwoop%2Fgiwo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknwoop%2Fgiwo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknwoop%2Fgiwo/lists"}