{"id":35189713,"url":"https://github.com/kfly8/git-wo","last_synced_at":"2026-01-13T23:00:48.553Z","repository":{"id":330919043,"uuid":"1107323887","full_name":"kfly8/git-wo","owner":"kfly8","description":"A thin wrapper around git worktree that creates worktrees in a ghq-style directory structure.","archived":false,"fork":false,"pushed_at":"2025-12-29T03:30:14.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-31T22:16:39.108Z","etag":null,"topics":["git"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/kfly8.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,"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-12-01T01:17:01.000Z","updated_at":"2025-12-29T03:30:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kfly8/git-wo","commit_stats":null,"previous_names":["kfly8/git-wo"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/kfly8/git-wo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kfly8%2Fgit-wo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kfly8%2Fgit-wo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kfly8%2Fgit-wo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kfly8%2Fgit-wo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kfly8","download_url":"https://codeload.github.com/kfly8/git-wo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kfly8%2Fgit-wo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28400966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: 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"],"created_at":"2025-12-29T05:32:50.660Z","updated_at":"2026-01-13T23:00:48.545Z","avatar_url":"https://github.com/kfly8.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-wo\n\nA thin wrapper around `git worktree` that creates worktrees in a ghq-style directory structure.\n\n## Overview\n\n`git-wo` organizes worktrees under `~/worktree/\u003chost\u003e/\u003cuser\u003e/\u003crepo\u003e/\u003cbranch\u003e`, making it easy to manage multiple worktrees across different repositories.\n\n```\n~/worktree/github.com/kfly8/my-project/feature1\n~/worktree/github.com/kfly8/my-project/feature2\n~/worktree/gitlab.com/team/other-repo/bugfix\n```\n\n## Installation\n\n```bash\ncurl -o ~/bin/git-wo https://raw.githubusercontent.com/kfly8/git-wo/main/git-wo\nchmod +x ~/bin/git-wo\n```\n\nMake sure `~/bin` is in your `PATH`.\n\n## Usage\n\n```bash\n# Create a new worktree (creates new branch from current HEAD)\ngit wo add feature1\n\n# Create a new worktree from a specific branch\ngit wo add feature1 main\n\n# Pass options to git worktree add\ngit wo add feature1 main --track\n\n# List worktrees\ngit wo list\n\n# Remove a worktree\ngit wo remove feature1\n\n# Remove all worktrees for merged branches\ngit wo prune-merged\n\n# Prune stale worktree info\ngit wo prune\n```\n\n## Configuration\n\nConfigure via `git config`:\n\n```bash\n# Set worktree root directory (default: ~/worktree)\ngit config --global wo.root ~/worktree\n\n# Set post-create hook script\ngit config --global wo.postHook ~/.config/git-wo/post-hook\n```\n\n### Post Hook\n\nThe `wo.postHook` script runs after creating a worktree. Environment variables available:\n\n- `ORIGINAL_PATH`: Path to the original repository\n- `WORKTREE_PATH`: Path to the new worktree\n- `BRANCH_NAME`: Name of the new branch\n\nExample hook script (`~/.config/git-wo/post-hook`):\n\n```bash\n#!/bin/bash\ncp \"$ORIGINAL_PATH/.envrc\" \"$WORKTREE_PATH/\" 2\u003e/dev/null\ndirenv allow \"$WORKTREE_PATH\"\nmise trust \"$WORKTREE_PATH\"\n```\n\nDon't forget to make it executable: `chmod +x ~/.config/git-wo/post-hook`\n\n## Tips\n\n### fzf integration\n\nAdd to your `.zshrc` to jump between worktrees with `Ctrl-G`:\n\n```bash\nfunction fzf-worktree () {\n  local selected=$(git worktree list 2\u003e/dev/null | fzf --query=\"$LBUFFER\" | awk '{print $1}')\n  if [ -n \"$selected\" ]; then\n    BUFFER=\"cd ${selected}\"\n    zle accept-line\n  fi\n  zle reset-prompt\n}\nzle -N fzf-worktree\nbindkey '^g' fzf-worktree\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkfly8%2Fgit-wo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkfly8%2Fgit-wo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkfly8%2Fgit-wo/lists"}