sync
Sync branch with remote and confirm a clean end-of-session state.
SKILL.mdskills/sync/SKILL.md
GitHubSync
Standardize the end-of-session push. Confirm nothing is left unpushed.
Inputs
Optional: -DryRun (print actions only), -AllowMain (permit syncing on main).
Workflow
- Confirm current branch is not
main(unless-AllowMain). - Confirm working tree is clean. If not, warn and stop; instruct the user to commit the changes they want to keep, stash them with
git stash, or discard them intentionally before rerunning sync. - Run
git pull --rebase. If it fails, stop and report — do not force. - Run
git push. - Run
git status -sband confirm branch is up to date.
Output
Short summary including the final git status -sb.