核心变更: - _common.sh: setup_worktree 改为 session-unique detached worktree (origin/main) - 所有 Agent 文档移除 git checkout main / git pull origin main - Feature branch 统一从 origin/main 创建: git fetch origin && git checkout -b <branch> origin/main - CLAUDE.md: 新增工作区隔离章节, primary worktree 定义为只读参考区 - 新增 start_generic.sh: Generic session worktree 隔离启动器 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
# Generic session 启动脚本 — 为人类用户提供 worktree 隔离
|
||||
# 用法: bash scripts/start_generic.sh
|
||||
# GITEA_USER 默认 pzhangzywl(人类用户),可通过环境变量覆盖
|
||||
|
||||
set -eu
|
||||
|
||||
export GITEA_USER="${GITEA_USER:-pzhangzywl}"
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
source "$SCRIPT_DIR/_common.sh"
|
||||
|
||||
setup_worktree "$GITEA_USER"
|
||||
trap 'cleanup_worktree' EXIT
|
||||
|
||||
banner "Generic"
|
||||
require_token
|
||||
|
||||
echo "工作目录: $PROJECT_DIR"
|
||||
echo ""
|
||||
cd "$PROJECT_DIR"
|
||||
claude
|
||||
Reference in New Issue
Block a user