Skip to content

Commit c9c0593

Browse files
rcohlandonxjames
andauthored
Document pre-commit hook workflow in AGENTS.md (#4641)
When pre-commit hooks modify files (e.g., formatting, runtime-versioner), the commit fails. This documents the fix: `git add -u` followed by re-running the commit. Co-authored-by: Landon James <lnj@amazon.com>
1 parent 75adad1 commit c9c0593

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,19 @@ val mimeType = RuntimeType.forInlineFun("APPLICATION_JSON", module) {
137137

138138
⚠️ **Footgun**: Name collisions mean only one implementation gets generated.
139139

140+
## Git Workflow
141+
142+
**Committing with pre-commit hooks:**
143+
144+
This repo uses pre-commit hooks (formatting, linting, `runtime-versioner`). Some hooks modify files (e.g., reformatting). When a hook modifies files, the commit will fail. To fix:
145+
146+
```bash
147+
git add -u
148+
git commit -m "your message"
149+
```
150+
151+
The `git add -u` stages the hook's modifications, and the second commit attempt will pass. Do **not** use `--no-verify` to skip hooks.
152+
140153
## GitHub CLI Integration
141154

142155
**View issues and PRs:**

0 commit comments

Comments
 (0)