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.
1.4 KiB
1.4 KiB
Git Guide
This file records repo-specific git workflow preferences for /home/aw/code/cds.
Repository Reference
- Active repository:
https://git.devreser.com/anthony.wen/cds-ai.git - Treat this repository URL as the current
originfor this workspace unless the user explicitly says it changed.
Commit Message Requests
- If the user asks for a git commit description, draft the proposed commit message first.
- After the proposed commit message, show the exact
git commitcommand that would be used. - After the
git commitcommand, show the exactgit push -u origin maincommand that would be used. - Do not run
git commitimmediately after drafting the message. - Do not run
git pushimmediately 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 mainby default unless the user explicitly asks for a different remote or branch. - If
git push -u origin mainprompts 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.
- Leave unrelated worktree changes uncommitted unless the user explicitly asks to include them.