synclisted
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