sync-git
Installation
SKILL.md
Sync Git
Usage
Run the sync script from the repo root. The script may be installed at the project level or the user level, so resolve the path before running (project level takes precedence):
SYNC=".claude/skills/sync-git/scripts/sync.sh"
[ -f "$SYNC" ] || SYNC="$HOME/.claude/skills/sync-git/scripts/sync.sh"
bash "$SYNC"
Interpret output
- exit 0 — Success. Show the stdout summary to the user. Done.
- exit 1 — Worktree detected. Follow Fallback: Worktree below.
- exit 2 — Rebase conflict. Follow Fallback: Conflict Resolution below.
- exit 3 — Push rejected after 3 retries. Follow Fallback: Push Failure below.
- exit 4 — Network/SSH error. Tell user to check SSH agent or connection.
Fallback: Worktree
If running inside a worktree (not the main working tree):
- Commit any uncommitted changes in the worktree branch.