Run all validations before pushing to remote
Final validation before pushing commits to remote repository.
Validate branch conventions and push commits to remote. Quality checks (fmt, clippy, tests)
are delegated to the .githooks/pre-push hook, which runs automatically when git push executes.
Hook delegation:
.githooks/pre-pushruns the canonical fmt / clippy / test block (see.claude/conventions/ci-checks.md) on everygit push. Runmake setuponce to activate the hook if you haven't already.
All of the following MUST pass before pushing:
git branch --show-current
Verify the branch name follows .claude/conventions/branching.md โ "Branch Naming
(label โ prefix)" (read it if unsure which prefix the Issue's labels map to).
FORBIDDEN branches for direct push:
main - Use PR onlydevelop - Use PR only (if applicable)git remote -v
git branch -vv
Verify:
origin)BRANCH=$(git branch --show-current)
echo "Current branch: $BRANCH"
Verify:
main or developgit log origin/$(git branch --show-current)..HEAD --oneline 2>/dev/null || git log --oneline -5
Review what will be pushed.
Before pushing, confirm:
.githooks/pre-push hook is active (make setup has been run)git push -u origin $(git branch --show-current)
The .githooks/pre-push hook will automatically run the canonical check block
(.claude/conventions/ci-checks.md) before the push completes.
If the .githooks/pre-push hook reports a failure:
/pre-pushWARNING: You are on branch 'main'. Direct pushes to main are not allowed.
CRITICAL: Never push to main/develop. Instead:
.claude/conventions/branching.md โ "Branch Base"
(Normal Mode: from origin/develop, never main; Stacked Mode only on an explicit
user request โ never inferred)/pr skill, which resolves the target branch into
$BASE_BRANCHIf the hook does not run (no [pre-push] output during push):
make setup
Then re-run the push.
User: "pushใใๅใซใใงใใฏใใฆ"
Claude executes /pre-push skill:
feature/84-agent-skills - VALIDgit push -u origin feature/84-agent-skills.githooks/pre-push runs fmt/clippy/test automaticallyAfter push completes successfully, output:
Pre-push Complete
=================
[PASS] Branch: feature/84-agent-skills (valid naming)
[PASS] Hook: cargo fmt, clippy, tests passed
[INFO] Commits pushed: X commits
Pushed to origin/feature/84-agent-skills