ClawBox Git Commit Push
Use this skill when the task is to prepare a clean git commit and push it from the current ClawBox repository.
Read first
git status --short --branchgit diff --statgit diff --cached --stat- Targeted
git diff -- <paths>for files intended for the commit
Workflow
- Inspect repo state before staging anything.
- Confirm the requested commit scope from actual modified files, not assumptions.
- Stage only intended paths with
git add <paths>. - Create the commit with
git commit -m "...". - Check upstream with
git rev-parse --abbrev-ref --symbolic-full-name @{u}. - Use
git pushwhen upstream exists, orgit push -u origin <branch>when the target is obvious. - Report the commit hash, branch, and push result.
Guardrails
- Never use destructive commands such as
git reset --hard,git checkout --, rebase, or force-push unless the user explicitly asks. - Never stage unrelated or generated files silently.
- Never amend a commit unless explicitly requested.
- Prefer non-interactive git commands only.
- Stop and ask when branch target, commit scope, or staged changes are ambiguous.
Verification
- Run
git status --short --branchbefore and after the commit. - Run
git log --oneline -1after the commit. - If pushed, verify the branch is no longer ahead with
git status --short --branch.