Files
sproutclaw/scripts/new-feature.sh
root 0a91cc99d0
Some checks failed
CI / build-check-test (push) Has been cancelled
chore: add sproutclaw git workflow and track local extensions
Document main/upstream-sync/feature branch strategy, add sync/push
scripts, track .pi/agent extensions and webui in git, and disable
startup changelog via showChangelogOnStartup.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-22 20:38:20 +08:00

22 lines
434 B
Bash
Executable File

#!/usr/bin/env bash
# Create a feature branch from latest main.
set -euo pipefail
if [[ $# -lt 1 ]]; then
echo "Usage: $0 <feature-name>" >&2
echo "Example: $0 webui-avatar-fix" >&2
exit 1
fi
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT"
NAME="$1"
BRANCH="feature/$NAME"
git checkout main
git pull --ff-only origin main 2>/dev/null || true
git checkout -b "$BRANCH"
echo "Created and switched to $BRANCH"