sync
1.2K
总安装量
1.2K
周安装量
#684
全站排名
安装命令
npx skills add https://github.com/october-academy/agent-plugins --skill sync
Agent 安装分布
codex
957
gemini-cli
956
amp
956
github-copilot
956
opencode
956
kimi-cli
955
Skill 文档
Sync Skill
Quick git synchronization with remote repository.
Usage
Commands
/sync # Pull from origin main
/sync develop # Pull from origin develop
/sync upstream # Pull from upstream main (forks)
Korean Triggers
- “ë기í”
- “ì격ìì ê°ì ¸ì”
- “í ë°ì”
Workflow
1. Pre-sync Check
git status
If working directory has uncommitted changes:
Options:
- Stash:
git stashâ sync âgit stash pop - Commit first: Suggest using
/cp - Discard: Only if user confirms with
git checkout .
2. Fetch and Pull
Default (origin main):
git pull origin main
With rebase (cleaner history):
git pull --rebase origin main
3. Report Results
After successful sync:
Synced with origin/main
- 3 commits pulled
- Files changed: 5
- No conflicts
Handling Conflicts
If merge conflicts occur:
- List conflicting files
- Offer to help resolve
- After resolution:
git add <files>âgit commit
Common Scenarios
Fork Workflow
# Add upstream if not exists
git remote add upstream <original-repo-url>
# Sync with upstream
git fetch upstream
git merge upstream/main
Diverged Branches
If local and remote have diverged:
# Option 1: Merge (default)
git pull origin main
# Option 2: Rebase (cleaner)
git pull --rebase origin main
# Option 3: Reset (destructive, ask user)
git fetch origin
git reset --hard origin/main
Error Handling
| Error | Solution |
|---|---|
| “Uncommitted changes” | Stash or commit first |
| “Merge conflict” | Help resolve conflicts |
| “Remote not found” | Check git remote -v |