| name | sync-upstream |
| description | Sync from upstream remote's main branch and push to origin's main branch. Use when user says "sync", "pull", or /sync-upstream. In Claude Code and Cursor, /skills lists all. |
Sync Upstream
Sync from the upstream remote's main branch, then push to origin's main branch.
Command
git pull --no-rebase upstream main && git push origin main
Steps
- Run
git pull --no-rebase upstream main to fetch and merge from upstream.
- If pull succeeds, run
git push origin main to push the merged state to origin.
- Report the result.
Error Handling
- Merge conflicts: Alert the user and list conflicting files. Do not auto-resolve.
- Authentication failures: Remind user to check SSH keys or credentials for both remotes.
- Upstream not configured: Run
git remote -v and show current remotes so the user can fix it.