From 538e21f43c8bc8f09da20d2279e877cb4ad9e680 Mon Sep 17 00:00:00 2001 From: Zhongwei Li Date: Sat, 29 Nov 2025 17:53:39 +0800 Subject: [PATCH] Initial commit --- .claude-plugin/plugin.json | 12 ++++++++++ README.md | 3 +++ commands/create-worktrees.md | 28 ++++++++++++++++++++++ plugin.lock.json | 45 ++++++++++++++++++++++++++++++++++++ 4 files changed, 88 insertions(+) create mode 100644 .claude-plugin/plugin.json create mode 100644 README.md create mode 100644 commands/create-worktrees.md create mode 100644 plugin.lock.json diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..65ba361 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,12 @@ +{ + "name": "create-worktrees", + "description": "Creates git worktrees for all open PRs or specific branches, handling branches with slashes, cleaning up stale worktrees, and supporting custom branch creation for development.", + "version": "1.0.0", + "author": { + "name": "evmts", + "url": "https://github.com/evmts" + }, + "commands": [ + "./commands/" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..2b70a6a --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# create-worktrees + +Creates git worktrees for all open PRs or specific branches, handling branches with slashes, cleaning up stale worktrees, and supporting custom branch creation for development. diff --git a/commands/create-worktrees.md b/commands/create-worktrees.md new file mode 100644 index 0000000..69e1a99 --- /dev/null +++ b/commands/create-worktrees.md @@ -0,0 +1,28 @@ +--- +description: Creates git worktrees for all open PRs or specific branches, handling branches with slashes, cleaning up stale worktrees, and supporting custom branch creation for development. +author: evmts +author-url: https://github.com/evmts +version: 1.0.0 +--- + +# Git Worktree Commands + +This documentation provides two main bash scripts for Git worktree management: + +## 1. Create Worktrees for All Open PRs +- Uses GitHub CLI to fetch open pull requests +- Creates git worktrees for each PR branch +- Handles branch names with slashes +- Includes an optional cleanup script for stale worktrees + +## 2. Interactive Branch and Worktree Creation +- Prompts for a new branch name +- Validates branch name +- Creates a worktree in a `./tree/` directory +- Supports creating branches from different base commits + +## Key Features +- Error handling +- Directory management +- Flexible branch creation options +- Streamlined Git workflow by making branch and worktree management more efficient \ No newline at end of file diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..109e222 --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,45 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:ananddtyagi/claude-code-marketplace:plugins/create-worktrees", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "3c5a3ef043e9d932cfe37b52b850abd8d7be3731", + "treeHash": "e36acea753ab642005bc4bb274686a5f2a2b14a7aebc7bf849751c489bebad35", + "generatedAt": "2025-11-28T10:13:21.862311Z", + "toolVersion": "publish_plugins.py@0.2.0" + }, + "origin": { + "remote": "git@github.com:zhongweili/42plugin-data.git", + "branch": "master", + "commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390", + "repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data" + }, + "manifest": { + "name": "create-worktrees", + "description": "Creates git worktrees for all open PRs or specific branches, handling branches with slashes, cleaning up stale worktrees, and supporting custom branch creation for development.", + "version": "1.0.0" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "9a9bedd0f4637c88863d7dbdc1c804c3c122c7beaf452ed130b1170d78ff74e4" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "a6475713ab6e6733c10145b634703c1cc62dea0d5c1efd118b8e74bc5528e2ce" + }, + { + "path": "commands/create-worktrees.md", + "sha256": "6bbb9d68486e7fadac5093923ad0712c8df669725b65bada80566fd40e0f5d54" + } + ], + "dirSha256": "e36acea753ab642005bc4bb274686a5f2a2b14a7aebc7bf849751c489bebad35" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file