name: create-git-worktree description: 使用 git worktree 自动构建隔离的工作环境。从默认分支获取最新代码,在 .git-worktrees/ 目录中创建新的 worktree,并自动设置 .env 和 npm 依赖关系。分支名中的 ‘/’ 会自动转换为 ‘-’。现有 worktree 会被重复利用。
创建 Git Worktree 并设置环境
使用说明
执行以下命令来创建 git worktree 并设置环境。 请在参数中指定要转换为 git worktree 的分支名称。
bash scripts/create-worktree.sh [分支名称]