{"id":47825552,"url":"https://github.com/burglekitt/worktree","last_synced_at":"2026-04-03T19:38:20.547Z","repository":{"id":343755387,"uuid":"1176753424","full_name":"burglekitt/worktree","owner":"burglekitt","description":"CLI for people who use Git worktrees as part of their daily development flow and do not want to keep typing the same setup, cleanup, and editor-opening commands over and over.","archived":false,"fork":false,"pushed_at":"2026-03-23T16:29:05.000Z","size":113,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-24T13:57:10.988Z","etag":null,"topics":["cli","development-tools","git","git-worktree","productivity","workflow","workflow-management","workflow-tool"],"latest_commit_sha":null,"homepage":"https://burglekitt.github.io/worktree","language":"TypeScript","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/burglekitt.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-09T10:43:06.000Z","updated_at":"2026-03-23T16:29:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/burglekitt/worktree","commit_stats":null,"previous_names":["burglekitt/worktree"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/burglekitt/worktree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burglekitt%2Fworktree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burglekitt%2Fworktree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burglekitt%2Fworktree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burglekitt%2Fworktree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/burglekitt","download_url":"https://codeload.github.com/burglekitt/worktree/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burglekitt%2Fworktree/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31373221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T17:53:18.093Z","status":"ssl_error","status_checked_at":"2026-04-03T17:53:17.617Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["cli","development-tools","git","git-worktree","productivity","workflow","workflow-management","workflow-tool"],"created_at":"2026-04-03T19:38:19.896Z","updated_at":"2026-04-03T19:38:20.531Z","avatar_url":"https://github.com/burglekitt.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Worktree\n\n`worktree` is a CLI for people who use Git worktrees as part of their daily development flow and do not want to keep typing the same setup, cleanup, and editor-opening commands over and over.\n\n![Worktree](https://media1.giphy.com/media/v1.Y2lkPTc5MGI3NjExNW51dHJlNHRzYnRwd3c3ZWZ0dzllZTB1d3VnaGQxd2s4eDJlbDhnaiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/lqT2GstnDBVJE6qfkK/giphy.gif)\n\nIt wraps the most common worktree tasks into a small workflow-oriented tool:\n\n- create a new worktree from your default base branch\n- check out an existing remote branch into its own worktree\n- copy local env files into the new worktree\n- open the result in your editor automatically\n- list, reopen, remove, and clean up worktrees later\n\nThis README focuses on the fast path. The documentation website will cover deeper examples, advanced workflows, integrations, and troubleshooting.\n\nDocs: https://burglekitt.github.io/worktree\n\n## Why This Exists\n\nGit worktrees are great when you want multiple branches checked out at once, but the raw commands are still a bit awkward for everyday use. In practice, teams usually want a repeatable flow like this:\n\n1. branch off `origin/main`\n2. create a sibling worktree directory\n3. copy `.env` files\n4. open it in the editor\n5. clean up stale worktrees later\n\n`worktree` turns that into a few commands with sensible prompts.\n\nBy default, worktrees are created in a sibling folder named `\u003crepo\u003e.worktrees`, so your main repository stays clean while related worktrees stay easy to find.\n\n## Context Switching Without The Tax\n\nOne of the biggest wins with worktrees is how fast context switching becomes.\n\nInstead of juggling one checkout and constantly doing this dance:\n\n1. stash current changes\n2. switch branches\n3. do quick fix\n4. switch back\n5. unstash and resolve surprises\n\nyou keep each task in its own directory and jump between them directly.\n\nThat means:\n\n- fewer stash/unstash cycles\n- less risk of stash conflicts or forgotten stashes\n- less accidental cross-branch contamination\n- faster interrupts, reviews, and hotfixes\n\nIn short: stop paying a context-switching penalty and stop stashing just to move between tasks.\n\n## Install\n\n```bash\nnpm install -g @burglekitt/worktree\n```\n\nOr run it without a global install:\n\n```bash\nnpx @burglekitt/worktree --help\n```\n\n## Quick Start\n\nRun the initial configuration once inside a Git repository:\n\n```bash\nworktree config\n```\n\nThe setup flow can configure:\n\n- `defaultSourceBranch` for new worktrees, such as `origin/main`\n- `codeEditor` for automatically opening a worktree, such as `code`\n\nThen create your first worktree:\n\n```bash\nworktree branch feature/improve-readme\n```\n\nThat will:\n\n1. create a new branch from your configured source branch\n2. add a Git worktree under `\u003crepo\u003e.worktrees/feature/improve-readme`\n3. copy `.env` and `.env.local` files from the main repository\n4. open the new worktree in your configured editor, if one is set\n\n## Common Workflows\n\n### Start a new branch in its own worktree\n\n```bash\nworktree branch feature/add-bulk-actions\n```\n\nCreate from a different source branch:\n\n```bash\nworktree branch feature/add-bulk-actions --source origin/release/1.4\n```\n\n### Check out an existing remote branch\n\n```bash\nworktree checkout feature/fix-login-timeout\n```\n\nYou can also pass the full remote name:\n\n```bash\nworktree checkout origin/feature/fix-login-timeout\n```\n\nThis creates a local tracking branch in a dedicated worktree.\n\n### See what worktrees already exist\n\n```bash\nworktree list\n```\n\n### Reopen a worktree in your editor\n\n```bash\nworktree open feature/add-bulk-actions\n```\n\nIf you omit the branch name, the CLI shows an interactive picker.\n\n### Remove a worktree\n\n```bash\nworktree remove feature/add-bulk-actions\n```\n\nForce removal when you already know what you are doing:\n\n```bash\nworktree remove feature/add-bulk-actions --force\n```\n\nAliases are also available:\n\n```bash\nworktree rm feature/add-bulk-actions\n```\n\n### Clean up stale worktrees\n\n```bash\nworktree cleanup\n```\n\nThe cleanup command targets worktrees that are considered safe to remove, for example branches whose remote no longer exists or local worktrees with no tracked remote and no pending work.\n\n## Commands\n\n| Command                             | What it does                                        |\n| ----------------------------------- | --------------------------------------------------- |\n| `worktree config`                   | Configure defaults like source branch and editor    |\n| `worktree branch \u003cname\u003e`            | Create a new branch in a new worktree               |\n| `worktree checkout \u003cremote-branch\u003e` | Check out an existing remote branch into a worktree |\n| `worktree list`                     | List known worktrees                                |\n| `worktree open [branch]`            | Open an existing worktree in your editor            |\n| `worktree remove [branch]`          | Remove one or more worktrees                        |\n| `worktree cleanup`                  | Remove stale worktrees that are safe to delete      |\n\nFor command help at any time:\n\n```bash\nworktree help\nworktree help branch\n```\n\n## Configuration\n\nConfiguration is stored in local Git config under the `burglekitt.worktree.*` namespace.\n\nExamples:\n\n```bash\nworktree config defaultSourceBranch origin/main\nworktree config codeEditor code\nworktree config --list\nworktree config --missing\n```\n\n## What The README Covers\n\nThe README is intentionally optimized for onboarding and everyday usage.\n\nThe documentation website should be the place for:\n\n- in-depth walkthroughs\n- team conventions and naming strategies\n- integration guides\n- edge cases and troubleshooting\n- richer examples for different repository layouts\n\n## Requirements\n\n- Git installed and available on your `PATH`\n- Node.js available to run the CLI\n- an existing Git repository where you want to manage worktrees\n\nIf you want automatic editor launching, make sure your editor command is available in the shell, for example `code` for Visual Studio Code.\n\n## License\n\nMIT\n\n## TODO\n\n- [x] Add `config` command to configure everything needed\n- [x] Add `branch` command to create new worktrees\n- [x] Add `remove` command to delete worktrees\n- [x] Add `checkout` command to create worktree from a remote branch\n- [x] Add `list` command to list all worktrees\n- [x] Add `open` command to open a worktree in a code editor\n- [x] Add `cleanup` command to cleanup stale worktrees\n- [ ] Integrate with JIRA for automated branch naming\n- [ ] Integrate with ClickUp for automated branch naming\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburglekitt%2Fworktree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fburglekitt%2Fworktree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburglekitt%2Fworktree/lists"}