git-sync
Installation
SKILL.md
/git-sync
Commit what is in the working tree, pull, push, report. One step per line.
Stop and tell the user when a step says stop. NEVER force push, rebase shared history, or
skip a hook (--no-verify).
1 · Look
- Run
git status,git branch --show-currentandgit rev-parse --abbrev-ref @{upstream}. - Run
git fetchandgit rev-list --left-right --count HEAD...@{upstream}for ahead/behind. - Stop on a detached HEAD.
- Stop when a merge, rebase, cherry-pick or revert is in progress that this run did not start
(
.git/MERGE_HEAD,.git/rebase-merge,.git/rebase-apply,.git/CHERRY_PICK_HEAD). - Nothing to commit and nothing ahead or behind: say "in sync" and stop.