git-sync-manager-5-safe-branch-operations
정보
이 Claude 스킬은 Git 저장소 간 안전한 브랜치 전환을 가능하게 하며, 작업 전 브랜치 존재 여부를 검증하고 커밋되지 않은 변경 사항을 확인합니다. 보류 중인 변경 사항이 있을 때 브랜치 전환을 차단함으로써 데이터 손실을 방지합니다. 개발자는 여러 저장소를 관리할 때 일관되고 보호된 브랜치 전환을 보장하기 위해 이 하위 스킬을 사용해야 합니다.
빠른 설치
Claude Code
추천npx skills add vamseeachanta/workspace-hub/plugin add https://github.com/vamseeachanta/workspace-hubgit clone https://github.com/vamseeachanta/workspace-hub.git ~/.claude/skills/git-sync-manager-5-safe-branch-operationsClaude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요
문서
5. Safe Branch Operations
5. Safe Branch Operations
Switch branches safely across repositories:
#!/bin/bash
# ABOUTME: Safe branch switching across repositories
# ABOUTME: Validates branch existence and checks for uncommitted changes
switch_branch() {
local repo="$1"
local target_branch="$2"
if [[ ! -d "$repo/.git" ]]; then
echo "skip: not a git repo"
return 1
fi
cd "$repo" || return 1
# Check for uncommitted changes
if ! git diff --quiet 2>/dev/null || ! git diff --cached --quiet 2>/dev/null; then
echo "blocked: uncommitted changes"
return 1
fi
# Check if branch exists locally
if git show-ref --verify --quiet "refs/heads/$target_branch" 2>/dev/null; then
git checkout "$target_branch" 2>/dev/null
echo "switched: local branch"
return 0
fi
# Check if branch exists remotely
if git show-ref --verify --quiet "refs/remotes/origin/$target_branch" 2>/dev/null; then
git checkout -b "$target_branch" "origin/$target_branch" 2>/dev/null
echo "switched: created from remote"
return 0
fi
echo "skip: branch not found"
return 1
}
# Batch branch switch
batch_switch_branch() {
local target_branch="$1"
shift
local repos=("$@")
echo "Switching to branch: $target_branch"
echo ""
for repo in "${repos[@]}"; do
echo -n "→ $repo: "
switch_branch "$repo" "$target_branch"
done
}
GitHub 저장소
연관 스킬
algorithmic-art
메타This Claude Skill creates original algorithmic art using p5.js with seeded randomness and interactive parameters. It generates .md files for algorithmic philosophies, plus .html and .js files for interactive generative art implementations. Use it when developers need to create flow fields, particle systems, or other computational art while avoiding copyright issues.
subagent-driven-development
개발This skill executes implementation plans by dispatching a fresh subagent for each independent task, with code review between tasks. It enables fast iteration while maintaining quality gates through this review process. Use it when working on mostly independent tasks within the same session to ensure continuous progress with built-in quality checks.
executing-plans
디자인Use the executing-plans skill when you have a complete implementation plan to execute in controlled batches with review checkpoints. It loads and critically reviews the plan, then executes tasks in small batches (default 3 tasks) while reporting progress between each batch for architect review. This ensures systematic implementation with built-in quality control checkpoints.
cost-optimization
기타This Claude Skill helps developers optimize cloud costs through resource rightsizing, tagging strategies, and spending analysis. It provides a framework for reducing cloud expenses and implementing cost governance across AWS, Azure, and GCP. Use it when you need to analyze infrastructure costs, right-size resources, or meet budget constraints.
