From c0d1c15f95367078be69c8429ee81f4181a430df Mon Sep 17 00:00:00 2001 From: "anthony.wen" Date: Fri, 20 Mar 2026 21:24:06 -0400 Subject: [PATCH] Update git workflow guidance for reviewed commit and push flow Document the repo preference that commit-description requests must show the proposed commit message first, followed by the exact git commit command and the exact git push -u origin main command that would be executed. Require explicit user approval before running either command, and document that push operations should default to git push -u origin main with an interactive handoff at any password or SSH key passphrase prompt. --- git-guide.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/git-guide.md b/git-guide.md index 32e5e60..67a8d2d 100644 --- a/git-guide.md +++ b/git-guide.md @@ -8,9 +8,16 @@ This file records repo-specific git workflow preferences for `/home/aw/code/cds` ## Commit Message Requests - If the user asks for a git commit description, draft the proposed commit message first. -- When drafting a commit message, also show the exact `git commit` command that would be used. +- After the proposed commit message, show the exact `git commit` command that would be used. +- After the `git commit` command, show the exact `git push -u origin main` command that would be used. - Do not run `git commit` immediately after drafting the message. -- Wait for explicit user approval before creating the commit. +- Do not run `git push` immediately after drafting the message. +- Wait for explicit user approval before creating the commit or running the push command. + +## Push Requests +- When the user asks to push, use `git push -u origin main` by default unless the user explicitly asks for a different remote or branch. +- If `git push -u origin main` prompts for credentials or an SSH key passphrase, start the command interactively and hand off at the prompt so the user can provide the secret. +- After the user provides the secret, resume the same interactive push session and report the result. ## Commit Scope - When committing, include only the files relevant to the approved change.