github-pull
Pulls latest changes from remote. Use at session start or when user says 'pull', 'update', or 'get latest'.
GitHub Pull
Pull latest changes from the remote for the current branch. Designed for session-start sync.
Instructions
-
Check prerequisites. Run
git statusto see if the tree is clean or dirty.- If dirty and
--stashwas passed (or invoked by another skill), rungit stash push -m "github-pull auto-stash"first. - If dirty and no
--stashflag, warn the user and ask whether to stash, commit first, or abort.
- If dirty and
-
Fetch. Run
git fetch --pruneto get latest refs and clean up deleted remote branches. -
Pull.
- Default:
git pull --ff-only. This is the safest — it only succeeds if the local branch can fast-forward. - If
--rebasewas passed:git pull --rebase. - If fast-forward fails (diverged history), report the situation and ask the user: rebase, merge, or abort.
- Default:
-
Pop stash. If changes were stashed in step 1, run
git stash pop. If the pop conflicts, report it and let the user resolve. -
Report. Show:
- Branch name and tracking remote
- Number of new commits pulled (from fetch/pull output)
git log --oneline -5to show what came in- Current
git status
Examples
User: /github-pull
Check tree, fetch, fast-forward pull, report new commits.
User: pull latest
Same as above.
User: /github-pull --rebase --stash
Stash dirty tree, fetch, rebase pull, pop stash, report.
[Dirty working tree, no flags]
Warn user: "You have uncommitted changes. Stash them (--stash), commit first (/github-sync), or abort?"
Before completing, read and follow ../references/cross-cutting-rules.md.