# Sync Fork

> Sync the fork's main branch from the upstream remote and push to origin

- Skill: `mondaycom/sync-fork` (Agent Skill)
- Install (CLI): `npx skillmds@latest add mondaycom/sync-fork`
- Raw SKILL.md: https://api.skillmd.com/api/skills/mondaycom/sync-fork/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: mondaycom (https://skillmd.com/u/mondaycom)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/mondaycom/sync-fork

---


Sync the fork by pulling latest `main` from the upstream remote and pushing to `origin`.

The upstream remote name defaults to `upstream`. If `$ARGUMENTS` is provided, use that instead.

Steps:
1. Determine the upstream remote: use `$ARGUMENTS` if provided, otherwise `upstream`
2. Verify the remote exists: `git remote get-url <remote>` — stop and inform the user if not found
3. Save the current branch name using `git rev-parse --abbrev-ref HEAD`
4. Run `git checkout main`
5. Run `git pull <remote> main`
6. Run `git push origin main`
7. Checkout the branch saved in step 3

