Rechercher

PythonReactSEOPDF
GitHub Skill

commit-and-push

Commit staged changes and push to the remote using conventional commits with GPG signing. Use when you need to commit and push work, create a PR if missing, and wait for Gemini review before addressing feedback.

a2f0☆ 0 Étoiles du dépôt0 Forks du dépôt

Installation

Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.

Voir la source ↗Guides

Instructions

Commit and Push

Commit staged changes, push the branch, create a PR if needed, and handle initial Gemini review.

Setup

Determine the repository for all gh commands:

REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)

Always pass -R "$REPO" to gh commands.

Workflow

  1. Check branch:

    • If on main, create a new branch named for the change.
    • After creating/switching, update the VS Code title:
    setVscodeTitle.sh
    
  2. Analyze changes:

    • Run git status and git diff --staged to confirm what will be committed.
    • If tooling reports actions but git status shows no unexpected changes, proceed without asking about generated files.
  3. Commit format:

    • Follow CLAUDE.md commit guidelines (conventional commits, GPG signed with 5s timeout, no co-author lines, no footers).
    • Do not bump versions here.
  4. Push:

    • Push the current branch to the remote after the commit.
    • The pre-push hook runs full builds and tests; set a long timeout and do not assume timeouts mean failure.
  5. Open PR:

    • If no PR exists, create one with gh pr create.
    • Do not include auto-close keywords (Closes, Fixes, Resolves).
    • Use the Claude-style PR body format and include the evaluated agent id.

    Compute the agent id:

    AGENT_ID=$(basename "$(git rev-parse --show-toplevel)")
    

    PR body template (fill in real bullets, keep section order):

    PR_BODY=$(cat <<EOF
    ## Summary
    - <verb-led, concrete change>
    - <second concrete change if needed>
    
    ## Testing
    - <command run or "not run (reason)">
    
    ## Issue
    - #<issue-number>
    
    Agent: ${AGENT_ID}
    EOF
    )
    

    If there is no associated issue, replace the ## Issue section with:

    ## Related
    - <link or short reference>
    
    • After creating the PR, run setVscodeTitle.sh.
  6. Wait for Gemini:

    • Wait 60 seconds for Gemini Code Assist to review.
  7. Address feedback:

    • Run /address-gemini-feedback for unresolved comments.
    • Reply to Gemini using the REST API comment reply endpoint, not gh pr review.
    • Always include @gemini-code-assist in replies.

Token Efficiency

Suppress stdout on git commit and push:

git commit -S -m "message" >/dev/null
git push >/dev/null

Do not run git commit or git push without stdout suppression.

Exemples

Consultez les exemples du dépôt source.

Voir la source ↗

Historique source

Date d’indexation
2026-01-20
Mise à jour de l’index
2026-01-26
Branch
main

Les dates concernent ce répertoire. Consultez le dépôt pour l’historique du code.

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!