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.
Installation
Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.
Voir la source ↗GuidesInstructions
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
-
Check branch:
- If on
main, create a new branch named for the change. - After creating/switching, update the VS Code title:
setVscodeTitle.sh - If on
-
Analyze changes:
- Run
git statusandgit diff --stagedto confirm what will be committed. - If tooling reports actions but
git statusshows no unexpected changes, proceed without asking about generated files.
- Run
-
Commit format:
- Follow
CLAUDE.mdcommit guidelines (conventional commits, GPG signed with 5s timeout, no co-author lines, no footers). - Do not bump versions here.
- Follow
-
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.
-
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
## Issuesection with:## Related - <link or short reference>- After creating the PR, run
setVscodeTitle.sh.
- If no PR exists, create one with
-
Wait for Gemini:
- Wait 60 seconds for Gemini Code Assist to review.
-
Address feedback:
- Run
/address-gemini-feedbackfor unresolved comments. - Reply to Gemini using the REST API comment reply endpoint, not
gh pr review. - Always include
@gemini-code-assistin replies.
- Run
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)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!