diff options
| author | Kyle Altendorf <[email protected]> | 2026-04-24 17:42:10 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-04-24 17:42:10 -0400 |
| commit | bb3509b5ff445912e2b6d5f594866e92b42eb463 (patch) | |
| tree | 22c6f5be174153cf143e06342412ef02422cac9e | |
| parent | 4a67905266633f1867aaf89d863b4a8d149d5237 (diff) | |
| download | opencode-bb3509b5ff445912e2b6d5f594866e92b42eb463.tar.gz opencode-bb3509b5ff445912e2b6d5f594866e92b42eb463.zip | |
fix(opencode): clarify git amend condition to require verifying commit landed (#19937)
Co-authored-by: Aiden Cline <[email protected]>
Co-authored-by: Luke Parker <[email protected]>
Co-authored-by: Brendan Allan <[email protected]>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: Shoubhit Dash <[email protected]>
| -rw-r--r-- | packages/opencode/src/tool/bash.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/opencode/src/tool/bash.txt b/packages/opencode/src/tool/bash.txt index 668cea307..c2fe87379 100644 --- a/packages/opencode/src/tool/bash.txt +++ b/packages/opencode/src/tool/bash.txt @@ -58,7 +58,7 @@ Git Safety Protocol: - NEVER skip hooks (--no-verify, --no-gpg-sign, etc) unless the user explicitly requests it - NEVER run force push to main/master, warn the user if they request it - Avoid git commit --amend. ONLY use --amend when ALL conditions are met: - (1) User explicitly requested amend, OR commit SUCCEEDED but pre-commit hook auto-modified files that need including + (1) User explicitly requested amend, OR the commit succeeded and pre-commit hooks auto-modified files that need including — verify by checking `git log` that HEAD is the new commit before amending (2) HEAD commit was created by you in this conversation (verify: git log -1 --format='%an %ae') (3) Commit has NOT been pushed to remote (verify: git status shows "Your branch is ahead") - CRITICAL: If commit FAILED or was REJECTED by hook, NEVER amend - fix the issue and create a NEW commit |
