diff --git a/git-guide.md b/git-guide.md index bc90a2e..77eb020 100644 --- a/git-guide.md +++ b/git-guide.md @@ -25,6 +25,13 @@ This file records repo-specific git workflow preferences for `/home/aw/code/cds` - Do not treat a request such as "give me the git commit" or "make the commit" as approval by itself. - Only execute `git commit` after the user explicitly approves the displayed commit command. - If the user changes the requested commit message or scope after commands are shown, rebuild the proposal and wait for fresh approval. +- After executing `git commit`, always verify that the commit actually succeeded before reporting success. +- Verification must include checking that: + - `git commit` exited successfully + - `HEAD` advanced to a new commit + - the new commit appears in `git log --oneline -n 1` +- Do not claim a commit was created unless that verification has been completed. +- If `git commit` did not actually create a commit, report that clearly and leave the changes as uncommitted. ## 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.