← ClaudeAtlas

synclisted

Bring the local repository in line with its remote — fetch, prune, fast-forward the base branch, and report what diverged. It never rebases a feature branch, never resolves a conflict, and never discards a local commit. Use when asked to sync, pull latest, update from main, get up to date, catch up with remote, 同步一下, 拉一下最新的, 更新到最新, 跟 main 对齐, 更新一下代码. Not for shipping changes, deleting merged branches, or resolving a merge conflict.
Misoto22/skills · ★ 0 · AI & Automation · score 76
Install: claude install-skill Misoto22/skills
# Sync Bring the local repository in line with its remote, and say plainly what did not line up. Read [shared/git.md](shared/git.md) first. Base resolution, force-push rules, and what "merged" means after a rebase all live there. This skill only fast-forwards. Where a branch has diverged it reports and stops — choosing between rebase, merge, and reset is the user's call, and guessing it destroys work. ## 1. Fetch ```bash git fetch --all --prune --tags ``` `--prune` deletes remote-tracking refs whose upstream is gone. It touches no local branch and no file. It does not prune tags, and `--prune-tags` is deliberately not passed: that flag deletes every local tag the remote does not carry, including one made by hand five minutes ago, and a tag is sometimes the only thing keeping a commit reachable. A stale tag costs nothing. The alternative discards work, which is the one thing this skill never does. `git fetch` writes what it did to **stderr**, not stdout — capture it. The `fetched` line in the final report counts those lines, and a run that discards the output has nothing left to count. Lines opening `- [deleted]` are the pruned refs; `* [new tag]` are the tags. ## 2. Report before writing One command per line of the report. None of them writes: ```bash git status --porcelain # working tree git branch --show-current # current branch git rev-list --left-right --count @{u}...HEAD # behind, then ahead — in that order git