git-guard
Installation
SKILL.md
git-guard
Read only the reference file(s) needed for the current task.
| Domain | Covers | Reference | Load when… |
|---|---|---|---|
core |
commit, branch, merge, rebase, stash, worktree | references/core.md |
atomic git op needed |
github |
PR, review, issues, repo setup, releases, CI | references/github.md |
anything touching GitHub |
workflows |
feature, bugfix, refactor, release, hotfix sequences | references/workflows.md |
multi-step task |
decisions |
when to use what, risk table, situation → action map | references/decisions.md |
user needs guidance on approach |
Safety rules
Branching & history
- Never commit directly to
main— branch first, merge via PR. - Never rebase shared branches — rebase is for local/personal branches only.
- Before any history rewrite (
rebase,reset --hard, force push): rungit status+git diff --staged, show the user what will be affected, and confirm before proceeding. - Prefer
--force-with-leaseover--force— fails safely if remote has moved. - Never tag on a branch — only tag on
main(or the designated release branch).